Skip to content

Commit 244cb1f

Browse files
preacherwhiteakristoffersen
authored andcommitted
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
1 parent 11ca6e3 commit 244cb1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nerfstudio/engine/trainer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def train(self) -> None:
240240

241241
self._init_viewer_state()
242242
with TimeWriter(writer, EventName.TOTAL_TRAIN_TIME):
243-
num_iterations = self.config.max_num_iterations
243+
num_iterations = self.config.max_num_iterations - self._start_step
244244
step = 0
245245
self.stop_training = False
246246
for step in range(self._start_step, self._start_step + num_iterations):

0 commit comments

Comments
 (0)