facebookresearch / vicreg

VICReg official code base
MIT License
525 stars 88 forks source link

Readme commands to load pretrained models on PyTorch Hub (resnet50x2 and resnet200x2) not working #9

Closed xavibou closed 2 years ago

xavibou commented 2 years ago

Hi,

When running the commands specified on the readme file to load the pretrained models on PyTorch Hub, they fail for resnet50x2 and resnet200x2. The issue is that the callable methods that load such models in hubconf.py are not called 'resnet50x2' and 'resnet200x2' but 'resnet50x2' and 'resnet200x2', respectively.

I got it working by changing the original commands shown in the readme by the following:

import torch
resnet50 = torch.hub.load('facebookresearch/vicreg:main', 'resnet50')
resnet50x2 = torch.hub.load('facebookresearch/vicreg:main', 'resnet50w2')
resnet200x2 = torch.hub.load('facebookresearch/vicreg:main', 'resnet200w2')

Where I just replaced the 'x' by 'w' in 'resnet50x2' and 'resnet200x2'.

Thank you, Xavi

Adrien987k commented 2 years ago

Should be fixed now. Thanks.