mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
auto state-dict and remove the way the model is loaded during hpc
This commit is contained in:
@@ -110,9 +110,12 @@ class LightningModule(GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
model = cls(hparams)
|
||||
|
||||
# allow model to load
|
||||
# give model a chance to load something
|
||||
model.load_model_specific(checkpoint)
|
||||
model.load_state_dict(checkpoint['state_dict'], strict=False)
|
||||
|
||||
# load the state_dict on the model automatically
|
||||
model.load_state_dict(checkpoint['state_dict'])
|
||||
|
||||
return model
|
||||
|
||||
def summarize(self):
|
||||
|
||||
Reference in New Issue
Block a user