Mnist

Caffe Installation, Hello World

2017-12-03. Category & Tags: Caffe, Deep Learning, Mnist

Note: tested with Ubuntu 16.04.1 using /root, for newer Ubuntu version (>= 17.04), check here.

Installation & Self-Tests #

Use the installation script here.
//(Sunny only added conditional USE_CUDNN=1, the rest is the same as: ref. You may wanna set USE_CUDNN to 0, if no GPU is used).
Timing: 15min if everything goes well, while downloading speed 1~8MB/s.

Hello World (Mnist) #

prepare data: #

./data/mnist/get_mnist.sh        # will download into ./data/mnist/
./examples/mnist/create_mnist.sh # will create lmdb, compute image mean

train #

# < 1min on TitanX
./build/tools/caffe train -solver examples/mnist/lenet_solver.prototxt -gpu 0

updatedb && \
locate lenet_iter

//by default, -gpu device index is -1 (no gpu)
//The training can start from any training snapshot:
caffe train -solver=lenet_solver.prototxt -snapshot=lenet_iter_350.solverstate (see the end of this article)

...