This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
Load best model checkpoint #738
Answered
by
aniketmaurya
Pacman1984
asked this question in
Q&A
-
Hi everyone, is flash loading the best model checkpoint after training for max_epochs (best practice) or does it train max_epochs and holds the last model checkpoint? Thanks and all the best |
Beta Was this translation helpful? Give feedback.
Answered by
aniketmaurya
Sep 7, 2021
Replies: 1 comment
-
You can use model checkpoint callback and load the best weight. from pytorch_lightning.callbacks import ModelCheckpoint
checkpoint_callback = ModelCheckpoint(...)
trainer = Trainer(callbacks=[checkpoint_callback])
trainer.fit(model)
checkpoint_callback.best_model_path |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Pacman1984
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use model checkpoint callback and load the best weight.