-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
I encountered an error when loading a pretrained vgg19 model. I tried other networks like Alexnet and they're seemed fine.
I use torch==0.1.10, torchvision==0.1.7, just updated from master branch. Also, it's under Python3.6 on latest macOS.
Do anyone have any idea how this happened and can be fixed? An error message seems like complaining incompatible un-pickling.
model = models.vgg19(True)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/torchvision/models/vgg.py", line 141, in vgg19
model.load_state_dict(model_zoo.load_url(model_urls['vgg19']))
File "/usr/local/lib/python3.6/site-packages/torch/utils/model_zoo.py", line 57, in load_url
return torch.load(cached_file)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 222, in load
return _load(f, map_location, pickle_module)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 370, in _load
result = unpickler.load()
AttributeError: Can't get attribute '_rebuild_tensor' on <module 'torch._utils' from '/usr/local/lib/python3.6/site-packages/torch/_utils.py'>