High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed


Caffe is a deep learning framework developed by the Berkeley Vision and Learning Center (BVLC). Caffe takes advantage of the NVIDIA GPUs to process millions of images per day.

To view the available versions of Caffe, run:

module avail caffe
Interactive Usage On GPUs

We can use Slurm's sinteractive command to carry out the MNIST Tutorial. Allocate an interactive GPU node and load the caffe module:

[user@biowulf ~]$ sinteractive --constraint=gpuk20x --gres=gpu:k20x:1
[user@cn0603 ~]$ module load caffe

Copy the caffe examples, build, and data directories into your data directory:

[user@cn0603 ~]$ cd /data/$USER
[user@cn0603 user]$ mkdir caffe_workdir && cd caffe_workdir
[user@cn0603 caffe_workdir]$ cp -a /usr/local/apps/caffe/1.0.0-rc3/{examples,build,data} .

Run the following commands to prepare the datasets and train the model:

[user@cn0603 caffe_workdir]$ ./data/mnist/get_mnist.sh
[user@cn0603 caffe_workdir]$ ./examples/mnist/create_mnist.sh
[user@cn0603 caffe_workdir]$ ./examples/mnist/train_lenet.sh

At this point, you will see a lot of output from the training process. Near the end, you will see two messages:

Snapshotting to binary proto file
Snapshotting solver state to binary proto file

These are the output files saved in the caffe_workdir, the .caffemodel being the final model that you can use to train other datasets.


More information and tutorials can be found on the Caffe website.