Skip to content

Commit

Permalink
Add that step starting at 1 is imposed by pytorch
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelltaylor committed Oct 31, 2024
1 parent 3361ef7 commit 5a6ac7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fl4health/utils/nnunet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def get_lr(self) -> Sequence[float]:
f"Current LR step of {self._step_count} reached Max Steps of {self.max_steps}. LR will remain fixed.",
)

# Subtract 1 from step count since it starts at 1
# Subtract 1 from step count since it starts at 1 (imposed by PyTorch)
curr_step = min(self._step_count - 1, self.max_steps)
curr_window = int(curr_step / self.steps_per_lr)

Expand Down

0 comments on commit 5a6ac7a

Please sign in to comment.