Skip to content

Commit 406c785

Browse files
guanghouseroad
authored andcommitted
Be more explicit to avoid decode error in python3 (onnx#97)
1 parent 7bb1c7d commit 406c785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/PytorchCaffe2MobileSqueezeNet.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@
287287
],
288288
"source": [
289289
"# Verify it runs with predictor\n",
290-
"with open(\"squeeze_init_net.pb\") as f:\n",
290+
"with open(\"squeeze_init_net.pb\", \"rb\") as f:\n",
291291
" init_net = f.read()\n",
292-
"with open(\"squeeze_predict_net.pb\") as f:\n",
292+
"with open(\"squeeze_predict_net.pb\", \"rb\") as f:\n",
293293
" predict_net = f.read()\n",
294294
"from caffe2.python import workspace\n",
295295
"p = workspace.Predictor(init_net, predict_net)\n",

0 commit comments

Comments
 (0)