mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 13:28:59 +08:00
max number of iterations logic (#699)
* update max iters * deal with max iters
This commit is contained in:
1 parent
eff62f7c6c
commit
eaa16e535a
2 files changed
+13
-3
No files matched your search
@@ -52,7 +52,9 @@ descriptions = {k: convert_markup_to_ansi(v) for k, v in descriptions.items()}
|
|||||||
|
|
||||||
method_configs["nerfacto"] = Config(
|
method_configs["nerfacto"] = Config(
|
||||||
method_name="nerfacto",
|
method_name="nerfacto",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
trainer=TrainerConfig(
|
||||||
|
steps_per_eval_batch=500, steps_per_save=2000, max_num_iterations=30000, mixed_precision=True
|
||||||
|
),
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
datamanager=VanillaDataManagerConfig(
|
datamanager=VanillaDataManagerConfig(
|
||||||
dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=8192
|
dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=8192
|
||||||
@@ -75,7 +77,9 @@ method_configs["nerfacto"] = Config(
|
|||||||
|
|
||||||
method_configs["instant-ngp"] = Config(
|
method_configs["instant-ngp"] = Config(
|
||||||
method_name="instant-ngp",
|
method_name="instant-ngp",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
trainer=TrainerConfig(
|
||||||
|
steps_per_eval_batch=500, steps_per_save=2000, max_num_iterations=30000, mixed_precision=True
|
||||||
|
),
|
||||||
pipeline=DynamicBatchPipelineConfig(
|
pipeline=DynamicBatchPipelineConfig(
|
||||||
datamanager=VanillaDataManagerConfig(dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=8192),
|
datamanager=VanillaDataManagerConfig(dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=8192),
|
||||||
model=InstantNGPModelConfig(eval_num_rays_per_chunk=8192),
|
model=InstantNGPModelConfig(eval_num_rays_per_chunk=8192),
|
||||||
|
|||||||
@@ -184,10 +184,16 @@ class Trainer:
|
|||||||
|
|
||||||
self.eval_iteration(step)
|
self.eval_iteration(step)
|
||||||
|
|
||||||
if step != 0 and self.config.trainer.steps_per_save and step % self.config.trainer.steps_per_save == 0:
|
if step_check(step, self.config.trainer.steps_per_save):
|
||||||
self.save_checkpoint(step)
|
self.save_checkpoint(step)
|
||||||
|
|
||||||
writer.write_out_storage()
|
writer.write_out_storage()
|
||||||
|
# save checkpoint at the end of training
|
||||||
|
self.save_checkpoint(step)
|
||||||
|
if self.config.is_viewer_enabled():
|
||||||
|
while True:
|
||||||
|
self.viewer_state.vis["renderingState/isTraining"].write(False)
|
||||||
|
self._update_viewer_state(step)
|
||||||
|
|
||||||
def _check_viewer_warnings(self) -> None:
|
def _check_viewer_warnings(self) -> None:
|
||||||
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
|
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
|
||||||
|
|||||||
Reference in new issue
Block a user