Error when trying to use resnext50

FileNotFoundError: [Errno 2] No such file or directory: ‘…/…/…/fastai/fastai/weights/resnext_50_32x4d.pth’

arch = resnext50

tfms = tfms_from_model(arch, sz, aug_tfms=transforms_side_on, max_zoom=1.1)
data = ImageClassifierData.from_paths(PATH, bs=bsz, tfms=tfms)
learn = ConvLearner.pretrained(arch, data, precompute=True, ps=0.5)
2 Likes

Download the weights from here: http://files.fast.ai/models/weights.tgz . Untar them into the fastai folder inside your fastai repo.

14 Likes

Thanks @jeremy!

cd to /home/paperspace/fastai/courses/dl1/fastai

curl -O http://files.fast.ai/models/weights.tgz
tar zxvf weights.tgz

5 Likes

Thanks by me too, wanted to follow practic’ly as well - even though 've seen the vid in the doctors waiting room. Was eager to try at home and then … sombody asked the question and the answer was right there.
What a forum!

1 Like

This seems to have worked for me, thank you. I say seems because my kernel continues to die when I try to run:
learn = ConvLearner.pretrained(arch,data,precompute = True). But I don’t get the error.

In Google Colab the path is:
/usr/local/lib/python3.6/dist-packages/fastai/

3 Likes

Thanks @gabriel , I use colab and this solved my problem. :smile: