不够灵光的程序媛-----caffe (1)探索小实例mnist

mnist手写体数字识别的训练数据库

1.运行mnist
cd ~/caffe/caffe-master #主目录下
time sh examples/mnist/train_lenet.sh
2.设置参数 指定模型
./build/tools/caffe.bin test -model=examples/mnist/lenet_train_test.prototxt -weights=examples/mnist/lenet_iter_10000.caffemodel -gpu=0

实现Testing。参数说明如下:
test:表示对训练好的模型进行Testing,而不是training。其他参数包括train, time, device_query。
-model=XXX:指定模型prototxt文件,这是一个文本文件,详细描述了网络结构和数据集信息。
-weights=XXX:指定训练好的caffemodel二进制文件
-gpu=0:指定在GPU上运行,GPUID=0。如果你没有GPU就去掉这个参数,默认在CPU上运行

你可能感兴趣的:(实例)