[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_module
or even_module.module
in 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_dict
can not be loaded correctly.Can we just save the
state_dict
without_module
ormodule
by default?Beta Was this translation helpful? Give feedback.
All reactions