mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
Revert loading entire dataset to GPU if using masks (#1821)
This commit is contained in:
1 parent
d3f76f7f3c
commit
0eb0ceb3c0
1 file changed
+1
-2
@@ -116,8 +116,7 @@ class CacheDataloader(DataLoader):
|
||||
"""Returns a collated batch."""
|
||||
batch_list = self._get_batch_list()
|
||||
collated_batch = self.collate_fn(batch_list)
|
||||
exclude = [] if "mask" in collated_batch.keys() else ["image"] # type: ignore
|
||||
collated_batch = get_dict_to_torch(collated_batch, device=self.device, exclude=exclude)
|
||||
collated_batch = get_dict_to_torch(collated_batch, device=self.device, exclude=["image"])
|
||||
return collated_batch
|
||||
|
||||
def __iter__(self):
|
||||
|
||||
Reference in new issue
Block a user