I am also getting the same error. This is how I am trying to load model but not working. I have two network for one I did the same way but not for this one. Don’t understand. Could you please confirm if this issue is resolved.
depth_weights = torch.load(’./PretrainedModels/depth-2a464da4ea.pth.tar’ , map_location=‘cuda’)
depth.load_state_dict(depth_weights)
ERROR----- File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 836, in load_state_dict
self.class.name, “\n\t”.join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ResNetDepth:
Missing key(s) in state_dict: “conv1.weight”, “bn1.weight”, “bn1.bias”, "…
Unexpected key(s) in state_dict: “epoch”, “arch”, “state_dict”.