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

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Pacman1984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants