当所有数据都训练好之后,接下来就是如何将模型应用到实际数据了:
./build/tools/caffe.bin test -model=examples/mnist/lenet_train_test.prototxt -weights=examples/mnist/lenet_iter_10000.caffemodel -gpu=0
如果没有GPU则使用
./build/tools/caffe.bin test -model=examples/mnist/lenet_train_test.prototxt -weights=examples/mnist/lenet_iter_10000.caffemodel
test:表示对训练好的模型进行Testing,而不是training。其他参数包括train, time, device_query。
-model=XXX:指定模型prototxt文件,这是一个文本文件,详细描述了网络结构和数据集信息。
上面是网上找到的方法,总是提示“caffe.bin”不存在,最后发现不在上述的目录下,且去掉“.bin”, 才成功运行。
分析原因估计是在编译caffe时没有生存“build”目录。
继续学习吧!
9214

被折叠的 条评论
为什么被折叠?



