mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 02:24:38 +08:00
max number of iterations logic (#699)
* update max iters * deal with max iters
This commit is contained in:
parent
eff62f7c6c
commit
eaa16e535a
@ -52,7 +52,9 @@ descriptions = {k: convert_markup_to_ansi(v) for k, v in descriptions.items()}
|
||||
|
||||
method_configs["nerfacto"] = Config(
|
||||
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(
|
||||
datamanager=VanillaDataManagerConfig(
|
||||
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_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(
|
||||
datamanager=VanillaDataManagerConfig(dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=8192),
|
||||
model=InstantNGPModelConfig(eval_num_rays_per_chunk=8192),
|
||||
|
||||
@ -184,10 +184,16 @@ class Trainer:
|
||||
|
||||
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)
|
||||
|
||||
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:
|
||||
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user