"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
- "import caffe\n",
- "\n",
+ "# Make sure that caffe is on the python path:\n",
"caffe_root = '../' # this file is expected to be in {caffe_root}/examples\n",
+ "import sys\n",
+ "sys.path.insert(0, caffe_root + 'python')\n",
+ "\n",
+ "import caffe\n",
"\n",
"# Set the right path to your model definition file, pretrained model weights,\n",
"# and the image you would like to classify.\n",
"cell_type": "code",
"collapsed": false,
"input": [
+ "# Make sure that caffe is on the python path:\n",
+ "caffe_root = '../' # this file is expected to be in {caffe_root}/examples\n",
+ "import sys\n",
+ "sys.path.insert(0, caffe_root + 'python')\n",
+ "\n",
"import caffe\n",
"\n",
"# Load the original network and extract the fully-connected layers' parameters.\n",
"metadata": {}
}
]
-}
+}
\ No newline at end of file