Resnext101_64 model and Fastai library

Hi folks.

If I try and use that pretrained model (e.g. arch = resnext101_64, like recommended in lesson2/dog breeds competition), I get an error: indeed it tries to find a file containing (apparently) a set of weights for the earliest layers of that model, that is:

‘fastai/weights/resnext_101_64x4d.pth’

The problem is that fastai repository does NOT contain any weights directory.

Yet, If I try and use another pre-trained model, like resnet34 it works flawlessly. How can I get that resnext101_64 working?

3 Likes

Hello,

You will need to download a weights directory using wget:

3 Likes

And place it in the fastai/fastai directory?

Thanks! Sorry for the duplicate.

I think so.

May I ask where could I download resnext_101_64x4d.pth? I found the lua weights (called resnext_101_64x4d.t) on github but couldn’t find the .pth file.

@tschoy, @balnazzar, and @ecdrid: I am not sure if you have figured it out but here is how I did it:
cd /home/paperspace/fastai/fastai/
wget http://files.fast.ai/models/weights.tgz
then unzip file weights.tgz

8 Likes

Thx, someone already told me. I visited http://files.fast.ai/models/ earlier, but didn’t realize the what I was looking for was in weights.tgz

3 Likes

I met the same problem, thank you for your answer.

Just to add on the same thread about how to unzip the file.
tar -xvzf weights.tgz

I’m running the notebook within a docker image. Is there a way to pass a path for the .pth file? The default path is only accessible by within the docker and i downloaded the .pth weights file outside of the docker but did not find the place to pass the path parameter.