Remove unecessary assert in pixel sampler on image dimensions (#1861)

remove uneccessary assert on image dimension
This commit is contained in:
Matias Turkulainen authored and GitHub committed 2023-05-03 09:28:11 -07:00
1 parent cc80a331aa
commit ea35897668
1 file changed
+2 -2
+2 -2
View File
@@ -101,7 +101,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods
key: value[c, y, x] for key, value in batch.items() if key != "image_idx" and value is not None
}
assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape
assert collated_batch["image"].shape[0] == num_rays_per_batch
# Needed to correct the random indices to their actual camera idx locations.
indices[:, 0] = batch["image_idx"][c]
@@ -172,7 +172,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods
collated_batch["image"] = torch.cat(all_images, dim=0)
assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape
assert collated_batch["image"].shape[0] == num_rays_per_batch
# Needed to correct the random indices to their actual camera idx locations.
indices[:, 0] = batch["image_idx"][c]