It looks like you’ve saved the state_dict
from a nn.DataParallel
instance and try to load it to a vanilla module.
Here are some suggestions, how to deal with this issue.
You could just remove the module.
names from the state_dict
or save the state_dict
as torch.save(model.module.state_dict(), PATH)
.
1 Like