How to save a checkpoint every n steps and overwrite the previous saved checkpoints? #6329
Answered
by
SkafteNicki
stanleyshly
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
How do I save checkpoints every, as well as deleting and/or overwriting the previously saved checkpoints? |
Beta Was this translation helpful? Give feedback.
Answered by
SkafteNicki
Mar 4, 2021
Replies: 1 comment 2 replies
-
Just to be sure, do you mean every n step or every n epoch. checkpoint = pl.callbacks.ModelCheckpoint(period=n) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
SkafteNicki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just to be sure, do you mean every n step or every n epoch.
For doing it every n epoch, you can initialize model checkpoint with
period
parameter