Caffe
Interactive Usage on the GPU nodes
Grab a
GPU node with qlogin:
[abc123@login ~]$ qlogin -q gpu.q
[abc123@login ~]$ module load caffe
Copy the caffe examples and data directories to your data directory:
[abc123@login ~]$ cd /work/abc123
[abc123@login abc123]$ mkdir caffe_workdir && cd caffe_workdir
[abc123@login caffe_workdir]$ cp -a /cm/shared/apps/caffe/1.7.0/{examples,build,data,python} .
Run the following commands to prepare the datasets and train the model:
[abc123@login caffe_workdir]$ ./data/mnist/get_mnist.sh
[abc123@login caffe_workdir]$ ./examples/mnist/create_mnist.sh
[abc123@login 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
Once finished we can plot the models:
[abc123@gpu02 caffe_workdir]$ ./python/draw_net.py ./examples/siamese/mnist_siamese.prototxt ./examples/siamese/mnist_siamese.png
Drawing net to ./examples/siamese/mnist_siamese.png
[abc123@gpu02 caffe_workdir]$ ./python/draw_net.py ./examples/siamese/mnist_siamese_train_test.prototxt ./examples/siamese/mnist_siamese_train_test.png
Drawing net to ./examples/siamese/mnist_siamese_train_test.png
-- AdminUser - 09 Apr 2018