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即可;

refer to

http://blog.csdn.net/fengbingchun/article/details/49615883

http://blog.csdn.net/thystar/article/details/50470325

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值