reduced mem on train; figuring out memory leak on visualizer

This commit is contained in:
evonneng committed 2022-09-13 03:22:07 +00:00
1 parent 416669d808
commit 139da13be8
12 files changed
+22 -13

No files matched your search

+2 -2
View File
@@ -77,7 +77,7 @@ class CacheImageDataloader(DataLoader):
"""Returns a collated batch."""
batch_list = self._get_batch_list()
collated_batch = default_collate(batch_list)
collated_batch = get_dict_to_torch(collated_batch, device=self.device)
collated_batch = get_dict_to_torch(collated_batch, device=self.device, exclude=["image"])
return collated_batch
def __iter__(self):
@@ -162,7 +162,7 @@ class EvalDataloader(DataLoader):
ray_bundle.num_rays_per_chunk = self.num_rays_per_chunk
ray_bundle.camera_indices = torch.Tensor([image_idx])[..., None].int()
batch = self.input_dataset[image_idx]
batch = get_dict_to_torch(batch, device=self.device)
batch = get_dict_to_torch(batch, device=self.device, exclude=["image"])
return ray_bundle, batch