The same error happens to me.
What happens in my case is that, the model is saved as a ‘DataParallel’ object with python 2.
I solved it by loading the model with torch.load() in python 2. I then extracted the state_dict and saved it as a dictionary using torch.save. The dictionary then can be loaded with python 3 with no error.
In python 2,
saved = torch.load(fpath)
saved_sd = saved.state_dict()
output = {'arch': 'resnet18',\
          'state_dict': saved_sd}
torch.save(output, newpath)

In python 3,
torch.load(newpath)