I have trained one model in two gpus and saved it.
And now I want to reload it just in one gpu,the error cause which says
Missing key(s) in state_dict: “base_network.conv1.weight”,
Unexpected key(s) in state_dict: “module.base_network.conv1.weight”
It seems save a multi-gpu model will get a prefix name module
. Is there a more elegant way rather than using model_state_dict = state_dict[7:]
?