Error while loading state_dict - vision - PyTorch Forums
discuss.pytorch.org › t › error-while-loading-stateJun 27, 2019 · state_dict = state_dict.copy() File “/home/surya/myenv/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 539, in getattr type(self).name, name)) AttributeError: ‘Net’ object has no attribute ‘copy’ Next I have used copy.copy(state_dict). Then I got a new error. trained_model.load_state_dict(m) File “/home/surya/myenv/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 763, in load_state_dict load(self)