Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unpickling #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ImageNet Pretrained Network (VGG_S).ipynb
  • Loading branch information
LucasAdams committed Sep 15, 2015
commit 656b0aad607990dab11c4e2ab8e4f15a25ee6a30
5 changes: 4 additions & 1 deletion examples/ImageNet Pretrained Network (VGG_S).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@
"source": [
"import pickle\n",
"\n",
"model = pickle.load(open('vgg_cnn_s.pkl','rb'),encoding='latin-1')\n",
"try:\n",
"values = pickle.load(open('vgg19_normalized.pkl','rb'))['param values']\n",
"except UnicodeDecodeError:\n",
"values = pickle.load(open('vgg19_normalized.pkl','rb'),encoding='Latin-1')['param values'] # python3\n",
"CLASSES = model['synset words']\n",
"MEAN_IMAGE = model['mean image']\n",
"\n",
Expand Down