From 4d73c4e61e237f2a56cfdc229c456f136d5082f3 Mon Sep 17 00:00:00 2001 From: Daniel Wang <55667243+preacherwhite@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:50:37 -0500 Subject: [PATCH] Fix: number of iterations wasn't set correctly (num_iterations directly set to equal to max_num_iterations) (#3526) Fix: number of iterations wasn't set correctly The original code causes iteration to go over max_num_iterations, causing progress tracker be unable to estimate time needed to finish, and causes unwanted extra iterations --- nerfstudio/engine/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index d27185526..12796a540 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -240,7 +240,7 @@ class Trainer: self._init_viewer_state() with TimeWriter(writer, EventName.TOTAL_TRAIN_TIME): - num_iterations = self.config.max_num_iterations + num_iterations = self.config.max_num_iterations - self._start_step step = 0 self.stop_training = False for step in range(self._start_step, self._start_step + num_iterations):