[wip] dynamic batch size for instant ngp (#501)

* starting dynamic batch size branch

* dynamic batch pipeline code
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-09-21 14:07:04 -07:00
1 parent 0c43e7c4b2
commit 7b5a251a30
19 files changed
+351 -221

No files matched your search

+8
View File
@@ -87,6 +87,14 @@ class PixelSampler: # pylint: disable=too-few-public-methods
self.num_rays_per_batch = num_rays_per_batch
self.keep_full_image = keep_full_image
def set_num_rays_per_batch(self, num_rays_per_batch: int):
"""Set the number of rays to sample per batch.
Args:
num_rays_per_batch: number of rays to sample per batch
"""
self.num_rays_per_batch = num_rays_per_batch
def sample(self, image_batch: Dict):
"""Sample an image batch and return a pixel batch.