It’s recommended to store the model.module.state_dict() for data parallel models as explained here. If you’ve stored the model.state_dict(), all keys will include the .module keyword, which you would have to remove as described here.
model.module.state_dict()
model.state_dict()
.module