facebookresearch / WSL-Images

Weakly Supervised Learning On Images
Other
597 stars 63 forks source link

Passing 'pretrained' parameter to torch.hub.load raises error #10

Open sipan17 opened 4 years ago

sipan17 commented 4 years ago

🐛 Bug

Tried to load FB released pre-trained model on Instagram on PyTorch Hub. It works without passing the 'pretrained' parameter. But if the parameter is passed it raises error. I think this will cause inconsistency with loading of other models.

To Reproduce

Steps to reproduce the behavior:

model = torch.hub.load('facebookresearch/WSL-Images', 'resnext101_32x8d_wsl', pretrained=True)

TypeError: _resnext() got multiple values for argument 'pretrained'

Expected behavior

Load the architecture with random weights if the 'pretrained' parameter is False, and with the pretrained weights if it is True.