Skip to content
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

Save checkpoint for the last epoch #1926

Closed
ternaus opened this issue May 22, 2020 · 1 comment · Fixed by #1908
Closed

Save checkpoint for the last epoch #1926

ternaus opened this issue May 22, 2020 · 1 comment · Fixed by #1908
Labels
question Further information is requested

Comments

@ternaus
Copy link

ternaus commented May 22, 2020

How to save the checkpoint only for the last epoch?
In the docs:

if save_top_k == k, the best k models according to the quantity monitored will be saved. if save_top_k == 0, no models are saved. if save_top_k == -1, all models are saved. Please note that the monitors are checked every period epochs. if save_top_k >= 2 and the callback is called multiple times inside an epoch, the name of the saved file will be appended with a version count starting with v0.
  • k = 0 does not save any.
  • k > 1 saves only a few the best
  • k = -1 saves all of them

Currently, I am using k = -1, but it space consuming.

@ternaus ternaus added the question Further information is requested label May 22, 2020
@lgvaz
Copy link
Contributor

lgvaz commented May 22, 2020

PR #1908 will add that option with a save_last argument to ModelCheckpoint =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants