mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-24 08:35:41 +08:00
Don't throw away non-tensor objects in TensorDataclass (#2783)
* Don't throw away non-tensor objects in TensorDataclass * Update test_tensor_dataclass.py --------- Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
This commit is contained in:
1 parent
f55bd04ca6
commit
99073eb187
2 files changed
+8
No files matched your search
@@ -141,6 +141,8 @@ class TensorDataclass:
|
||||
new_dict[k] = v.broadcast_to(batch_shape)
|
||||
elif isinstance(v, Dict):
|
||||
new_dict[k] = self._broadcast_dict_fields(v, batch_shape)
|
||||
else:
|
||||
new_dict[k] = v
|
||||
return new_dict
|
||||
|
||||
def __getitem__(self: TensorDataclassT, indices) -> TensorDataclassT:
|
||||
|
||||
Reference in new issue
Block a user