-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Learning rate finder auto-suggest-LR algorithm is slightly too naive #1767
Comments
@SkafteNicki mind have a look ^^ |
This makes sense... @mstewart141 mind submitting a PR? :) |
but wouldn't it also be tricked by spikes anywhere? we're talking about local mins here... |
Maybe something like a patients would be a good idea... If it doesn't furhter decrease after 5 additional lr changes or something, use the lr with the minimum so far... |
i'm happy to try and help out. one simple fix would be to add a "minimum_lr_threshold" kwarg to the plot function referenced above, with a default value of say 1e-5. few models in practice want a max/initial lr below that figure (of course the default could be even lower as well). then, when plotting, plot the whole plot as done now, but select the best suggestion in the range only after the min thresh. the same fix could be applied to the suggestions that feed directly into the Trainer. the options would be to either pick a reasonable default and stick with the current api, or to accept |
i think that in practice the extreme spikes are a symptom of going from "totally random/untuned" to "ever so slightly tuned" and occur primarily right at the very very beginning. of course, some models may behave more pathologically, but making a good suggestion for such models is probably out of scope for a simple LR suggester |
🐛 Bug
The learning rate finder auto-suggest-LR finds the point of steepest loss descent but can be tricked by spikes early in the process. A short burn-in period at the beginning would resolve the issue.
To Reproduce
The text was updated successfully, but these errors were encountered: