How can i load LightningLite model? #14935
Unanswered
morestart
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments 1 reply
-
okay, i can't find any docs about load lightningLite model, i will back to the original ways to train my model. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @morestart, it is documented at https://pytorch-lightning.readthedocs.io/en/latest/model/build_model_expert.html#load: # Instead of `torch.save(...)`, call:
self.save(model.state_dict(), "path/to/checkpoint.ckpt")
# Instead of `torch.load(...)`, call:
self.load("path/to/checkpoint.ckpt") |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In pytorchLightning, i can use model.load_fromcheckpoint to load my model.
but i can't find any ways to load lightningLite model
i save model use
self.save(model.state_dict(), os.path.join(model_save, f'{best_loss:.3f}-{epoch}.pt'))
Beta Was this translation helpful? Give feedback.
All reactions