[Lite] Save the model state_dict without _module or module by default? #10753
Unanswered
hiyyg
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
In Lite, if I save
model.state_dict(), it contains_moduleor even_module.modulein ddp mode.It will cause some problems, for example if a model is trained with multiple gpus and then test with a single gpu, the
state_dictcan not be loaded correctly.Can we just save the
state_dictwithout_moduleormoduleby default?Beta Was this translation helpful? Give feedback.
All reactions