pylint and test cases for dataloader

This commit is contained in:
Ethan Weber committed 2022-04-23 19:45:53 +00:00
1 parent 391803759e
commit 80ad17700c
10 files changed
+94 -69

No files matched your search

+3 -1
View File
@@ -32,9 +32,11 @@ def collate_batch(batch_list, num_rays_per_batch, keep_full_image: bool = False)
assert pixels.shape == (num_rays_per_batch, 3), pixels.shape
# Needed to correct the random indices to their actual camera idx locations.
local_indices = indices.clone()
indices[:, 0] = batch["image_idx"][c]
collated_batch = {
"indices": indices,
"local_indices": local_indices, # local to the batch returned
"indices": indices, # with the abs camera indices
"pixels": pixels,
"mask": mask,
}