-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best model in ModelCheckpoint #1960
Comments
BTW, this is my solution but I don't think this should be necessary best_k = checkpoint.best_k_models
best_path = [b for b, v in best_k.items() if v == torch.min(best_k.values())][0] |
@mpariente Better condition will be: best_k = checkpoint.best_k_models
best_path = [b for b, v in best_k.items() if v == checkpoint.best)][0]
|
True, thanks, but this still doesn't change the fact that a |
The
This results in a file called: |
Thanks for the example, I also use it like that. |
Oh ok, sorry for bothering then, I should have checked master |
it's a great idea :) just someone beat you to it haha |
馃殌 Feature
Add a
best_model
attribute inModelCheckpoint
.Motivation
After training, it would be nice to easily have the path to the checkpoint with the best val loss.
Or is there an argument in the trainer to resume best state after training and I missed it? (totally possible)
The text was updated successfully, but these errors were encountered: