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:
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 examples/mnist/lenet_iter_10000.caffemodel Snapshotting solver state to binary proto file examples/mnist/lenet_iter_10000.solverstate
These are the output files saved in the caffe_workdir, the .caffemodel being the final model that you can use to train other datasets.
examples/mnist/lenet_iter_10000.caffemodel examples/mnist/lenet_iter_10000.solverstate
More information and tutorials can be found on the Caffe website.