mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 03:14:00 +08:00
Fix datamanagers' get_rays_per_batch functions in case of using DynamicBatchPipeline (#2522)
This commit is contained in:
1 parent
8e58021a47
commit
ce06935f3d
2 files changed
+8
No files matched your search
@@ -556,9 +556,13 @@ class VanillaDataManager(DataManager, Generic[TDataset]):
|
||||
raise ValueError("No more eval images")
|
||||
|
||||
def get_train_rays_per_batch(self) -> int:
|
||||
if self.train_pixel_sampler is not None:
|
||||
return self.train_pixel_sampler.num_rays_per_batch
|
||||
return self.config.train_num_rays_per_batch
|
||||
|
||||
def get_eval_rays_per_batch(self) -> int:
|
||||
if self.eval_pixel_sampler is not None:
|
||||
return self.eval_pixel_sampler.num_rays_per_batch
|
||||
return self.config.eval_num_rays_per_batch
|
||||
|
||||
def get_datapath(self) -> Path:
|
||||
|
||||
@@ -303,10 +303,14 @@ class ParallelDataManager(DataManager, Generic[TDataset]):
|
||||
|
||||
def get_train_rays_per_batch(self) -> int:
|
||||
"""Returns the number of rays per batch for training."""
|
||||
if self.train_pixel_sampler is not None:
|
||||
return self.train_pixel_sampler.num_rays_per_batch
|
||||
return self.config.train_num_rays_per_batch
|
||||
|
||||
def get_eval_rays_per_batch(self) -> int:
|
||||
"""Returns the number of rays per batch for evaluation."""
|
||||
if self.eval_pixel_sampler is not None:
|
||||
return self.eval_pixel_sampler.num_rays_per_batch
|
||||
return self.config.eval_num_rays_per_batch
|
||||
|
||||
def get_datapath(self) -> Path:
|
||||
|
||||
Reference in new issue
Block a user