Skip to content

Commit

Permalink
fix: Fixed LR find plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Dec 2, 2021
1 parent 7abc92f commit e1054d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion holocron/trainer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def plot_recorder(self, beta: float = 0.95, **kwargs: Any) -> None:
)
vals = np.array(smoothed_losses[data_slice])
min_idx = vals.argmin()
max_val = vals.max() if min_idx is None else vals[:min_idx].max() # type: ignore[misc]
max_val = vals.max() if min_idx is None else vals[:min_idx + 1].max() # type: ignore[misc]
delta = max_val - vals[min_idx]

plt.plot(self.lr_recorder[data_slice], smoothed_losses[data_slice])
Expand Down

0 comments on commit e1054d4

Please sign in to comment.