mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 06:18:44 +08:00
[wip] dynamic batch size for instant ngp (#501)
* starting dynamic batch size branch * dynamic batch pipeline code
This commit is contained in:
1 parent
0c43e7c4b2
commit
7b5a251a30
19 files changed
+351
-221
No files matched your search
@@ -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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user