1.首先下载caffe编译好的版本

下载地址:https://github.com/BVLC/caffe/tree/windows,如图:

caffe在win7 下简单测试

2.再下载mnist训练测试数据集

下载地址:http://yann.lecun.com/exdb/mnist/    如图:

caffe在win7 下简单测试

解压下载好的caffe,在caffe目录下创建一个data目录,把mnist下载的数据解压到data目录下,如图:

caffe在win7 下简单测试

caffe在win7 下简单测试

3.生成lmdb数据

写如下命令:

E:\caffe>convert_mnist_data.exe E:\caffe\data\train-images.idx3-ubyte E:\caffe\d

ata\train-labels.idx1-ubyte E:\caffe\examples\mnist\mnist_train_lmdb


E:\caffe>convert_mnist_data.exe E:\caffe\data\t10k-images.idx3-ubyte E:\caffe\da

ta\t10k-labels.idx1-ubyte E:\caffe\examples\mnist\mnist_test_lmdb

如图:

caffe在win7 下简单测试

caffe在win7 下简单测试

运行两个命令后,会生成如下文件, 如图:

caffe在win7 下简单测试 caffe在win7 下简单测试  

4.开始训练和测试

进入E盘的caffe目录下(我的是E盘下),写如下命令:

训练命令:E:\caffe>E:\caffe\bin\caffe.exe train --solver=examples\mnist\lenet_train.prototxt

测试命令:E:\caffe\bin\caffe.exe test  -model=examples\mnist\lenet_train_test.protxt

 -weights=E:\caffe\examples\mnist\lenet_iter_10000.caffemodel -gpu=0

如图:

caffe在win7 下简单测试

caffe在win7 下简单测试


训练结果如图:

caffe在win7 下简单测试

 测试结果如图:

caffe在win7 下简单测试




相关文章:

  • 2021-04-10
  • 2021-11-12
  • 2021-07-24
  • 2022-12-23
  • 2021-10-19
  • 2021-10-23
  • 2021-12-17
  • 2021-11-20
猜你喜欢
  • 2022-02-09
  • 2021-04-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
  • 2022-01-06
相关资源
相似解决方案