I’m a fan of Google Colab, because - once you find out about some little tricks - it is good to run whatever you need to run there.
Since I couldn’t find an answer of how to import different model architectures such as ResNext50 into Colab, I wanted to share this with you here so that you can go grab a coffee instead of spending the morning figuring out, where the fastai directory in colab lives.
You first need to maneuver into the fastai folder. You can do this like this:
# import os lib and change directory
import os
os.chdir(’/usr/local/lib/python3.6/dist-packages/fastai/’)
!ls -a
Then you can do the usual untar like this:
!wget http://files.fast.ai/models/weights.tgz
!tar -xvzf weights.tgz
That’s it - you’re good to go with any architectures Jeremy included in the weights file.
Cheerio