Skip to content

Instantly share code, notes, and snippets.

@CaptainAshis
Last active August 31, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CaptainAshis/74d581d9649661fa79f04168250ff94a to your computer and use it in GitHub Desktop.
Save CaptainAshis/74d581d9649661fa79f04168250ff94a to your computer and use it in GitHub Desktop.
model_weights fastai
# The link below has the weights for the models:-
! wget 'http://files.fast.ai/models/weights.tgz'
# The output is as below #####################################################
# --2018-08-27 09:24:02-- http://files.fast.ai/models/weights.tgz
# Resolving files.fast.ai (files.fast.ai)... 67.205.15.147
# Connecting to files.fast.ai (files.fast.ai)|67.205.15.147|:80... connected.
# HTTP request sent, awaiting response... 200 OK
# Length: 1195411318 (1.1G) [text/plain]
# Saving to: ‘weights.tgz’
# weights.tgz 100%[===================>] 1.11G 93.4MB/s in 14s
# 2018-08-27 09:24:16 (83.3 MB/s) - ‘weights.tgz’ saved [1195411318/1195411318]
################################################################################
# Move the weights.tgz file to the desired location
mv '/content/clouderizer/dogbreed/data/competitions/dog-breed-identification/weights.tgz' '/usr/local/lib/python3.6/dist-packages/fastai/'
# Browse to the directory where weights has been moved so as to unzip it
%cd /usr/local/lib/python3.6/dist-packages/fastai/
# And then unzip it
!tar -xvzf weights.tgz
#####################################################
# weights/
# weights/wrn_50_2f.pth
# weights/resnext_101_32x4d.pth
# weights/resnext_101_64x4d.pth
# weights/inceptionresnetv2-d579a627.pth
# weights/inceptionv4-97ef9c30.pth
# weights/resnext_50_32x4d.pth
#####################################################
# After unzipping it , browse back to the main directory
%cd /content/clouderizer/dogbreed/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment