what's the difference between load_from_checkpoint
and resume_from_checkpoint
#11378
Answered
by
rohitgr7
marsggbo
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
I'm confused about two API:
|
Beta Was this translation helpful? Give feedback.
Answered by
rohitgr7
Jan 9, 2022
Replies: 1 comment 1 reply
-
resume_from_checkpoint is used to resume the training using the checkpointed state_dicts. It will reload model's state_dict, optmizer's and schedulers's state_dicts, training state as well in a general case. load_from_checkpoint just reloads the model's state_dict and return the model with the loaded weights. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marsggbo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
resume_from_checkpoint is used to resume the training using the checkpointed state_dicts. It will reload model's state_dict, optmizer's and schedulers's state_dicts, training state as well in a general case.
use-case: to restart the training
load_from_checkpoint just reloads the model's state_dict and return the model with the loaded weights.
use-case: for quick evaluation/prediction.