Using Caffe On The Lab Computers
Revision as of 15:20, 10 May 2016 by Steve410.cs.jhu.edu (talk | contribs)
Using a reference CaffeNet model from a student's Jupyter notebook code, we have found there are several things one needs to be aware of for the Caffe installation on our CS Lab computers:
* You don't need to `import sys` and add things to `sys.path`. You can
just `import caffe`.
* You need to be running on one of the lab machines (ugrad1 through
ugrad24; masters1 through masters16) in order to use GPU mode. Caffe
will run on our compute systems (ugradx, gradx, gradz), but only in CPU
mode; you won't be able to do the GPU section of the notebook on those
three systems.
* The systemwide installation *only* includes the Caffe binaries and
python modules. It does not include the utility scripts and reference
models. You will need to download those yourself.
What you'll need to do is grab your own copy of the Caffe distribution in order
to use their models:
git clone https://github.com/BVLC/caffe.git
Then, as the notebook indicates, run python from the examples directory:
cd caffe/examples
python
The notebook's second input block should be as follows:
caffe_root = '../' # this file should be run from {caffe_root}/examples (otherwise change this line)
import caffe
Everything else should work as expected.