mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 15:28:49 +08:00
Terrance/instant ngp bug (#324)
* adding after iter callbacks in training loop * moved callback * fixed network name Co-authored-by: Ethan Weber <eweb0124@gmail.com>
This commit is contained in:
1 parent
8670f19d2d
commit
9b0cf2ab16
2 files changed
+6
-1
No files matched your search
@@ -138,6 +138,11 @@ class Trainer:
|
|||||||
)
|
)
|
||||||
|
|
||||||
loss_metric_dict = self.train_iteration(step)
|
loss_metric_dict = self.train_iteration(step)
|
||||||
|
|
||||||
|
# training callbacks after the training iteration
|
||||||
|
for callback in self.callbacks:
|
||||||
|
callback.run_callback_at_location(step, location=TrainingCallbackLocation.AFTER_TRAIN_ITERATION)
|
||||||
|
|
||||||
with TimeWriter(writer, EventName.ITER_VIS_TIME, step=step) as _:
|
with TimeWriter(writer, EventName.ITER_VIS_TIME, step=step) as _:
|
||||||
self.visualizer_state.update_scene(step, self.pipeline.model)
|
self.visualizer_state.update_scene(step, self.pipeline.model)
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class NeRFModel(Model):
|
|||||||
where_to_run=[TrainingCallbackLocation.AFTER_TRAIN_ITERATION],
|
where_to_run=[TrainingCallbackLocation.AFTER_TRAIN_ITERATION],
|
||||||
update_every_num_iters=self.density_field.update_every_num_iters,
|
update_every_num_iters=self.density_field.update_every_num_iters,
|
||||||
func=self.density_field.update_density_grid,
|
func=self.density_field.update_density_grid,
|
||||||
kwargs={"density_eval_func": self.field.density_fn}, # type: ignore
|
kwargs={"density_eval_func": self.field_coarse.density_fn}, # type: ignore
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
return callbacks
|
return callbacks
|
||||||
|
|||||||
Reference in new issue
Block a user