Can't get pre-trained model of Resnet50

Hi,
I’m trying to run V2 Lesson3 planet notebook, I’m stuck at the create_cnn function which try to download the pre-trained parameters of Resnet50.

learn = create_cnn(data, arch, metrics=[acc_02, f_score])

I get the following error -

Downloading: “https://download.pytorch.org/models/resnet50-19c8e357.pth” to /home/jupyter/.torch/models/resnet50-19c8e357.pth

TypeError Traceback (most recent call last)
/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/timeout.py in _validate_timeout(cls, value, name)
123 try:
–> 124 float(value)
125 except (TypeError, ValueError):

TypeError: float() argument must be a string or a number, not ‘Timeout’

I tried to google it, and I saw similar issue with old “request” version. i’m not sure if this is the case here and how to update the request library.
I’m using the latest Fast ai (1.0.42) through Google Cloud.

When I try to switch back to arch Resnet34, which I already downloaded in the past everything is working fine.

Any help will be great,
Thanks, Ran

That’s on the pytorch side (torchvision to be more specific) so you should try to file an issue on torchvision or ask on their forum.

I’ve got the same error on Google cloud.
I found the solution for the problem on the forum: https://discuss.pytorch.org/t/torchvision-url-error-when-loading-pretrained-model/2544/7

But this solution doesn’t work for me :frowning: But, you can download directly your architecture by wget.

!wget https://download.pytorch.org/models/resnet50-19c8e357.pth
!mv resnet50-19c8e357.pth  /home/jupyter/.torch/models/ 

arch = models.resnet50
learn = create_cnn(data, arch, metrics=[acc_02, f_score])