Ubuntu 14.04 64位机上用Caffe+MNIST训练Lenet网络操作步骤

14.04 64位机上用Caffe+MNIST训练Lenet网络操作步骤

1.将终端定位到Caffe根目录;

2.下载MNIST数据库并解压缩:$ ./data/mnist/get_mnist.sh

3.将其转换成Lmdb数据库格式:$ ./examples/mnist/create_mnist.sh

执行完此shell脚本后,会在./examples/mnist下增加两个新目录,mnist_test_lmdb和mnist_train_lmdb

4.train model:$ ./examples/mnist/train_lenet.sh

(1)、使用LeNet网络(《Gradient-BasedLearning Applied to Document Recognition》);

(2)、使用./examples/mnist/lenet_train_test.prototxtmodel;

(3)、使用./examples/mnist/lenet_solver.prototxtmodel;

(4)、执行train_lenet.sh脚本,会调用./build/tools目录下的caffe执行文件,此执行文件的实现是./tools目录下的caffe.cpp文件;

(5)、执行此脚本后,会生成几个文件,其中./examples/mnist/lenet_iter_10000.caffemodel则是最终训练生成的model文件;

(6)、以上默认的是在GPU模式下运行,如果想让其在CPU模式下运行,只需将lenet_solver.prototxt文件中的solver_mode字段值由原来的GPU改为CPU即可;

运行结果如下图:

udast

参考文献:https://caffe.berkeleyvision.org/gathered/examples/mnist.html

更多Ubuntu相关信息见

转载自:https://www.linuxidc.com/Linux/2015-11/124913.htm

声明: 除非转自他站(如有侵权,请联系处理)外,本文采用 BY-NC-SA 协议进行授权 | 智乐兔
转载请注明:转自《Ubuntu 14.04 64位机上用Caffe+MNIST训练Lenet网络操作步骤
本文地址:https://www.zhiletu.com/archives-5242.html
关注公众号:智乐兔

赞赏

wechat pay微信赞赏alipay pay支付宝赞赏

上一篇
下一篇

相关文章

在线留言

你必须 登录后 才能留言!

在线客服
在线客服 X

售前: 点击这里给我发消息
售后: 点击这里给我发消息

智乐兔官微