windows 下 对 caffe 模型进行测试

 

 

CMD命令

1、测试GPU峰值与时间

D:\ProjectWork\Caffe\Caffe_Windows\caffe_master\Build\x64\Release>caffe.exe time -model D:\newModelNoPlate\v\v.dep -gpu 0 -iterations 100

 

2、测试模型结构 GPU 

D:\ProjectWork\Caffe\Caffe_Windows\caffe_master\Build\x64\Release>caffe.exe test -model D:\newModelNoPlate\v\v.dep -weights D:\newModelNoPlate\v\v.mod -gpu 0 -iterations 100

 

 

通过查看GPU-Z 与最终结果显示平均时间

 

 http://blog.csdn.net/wang4959520/article/details/51499005

https://www.cnblogs.com/LaplaceAkuir/p/6250358.html

 

caffe.bin :command line brew

usage : caffe  <command><args>

commands:

  train:         训练或者微调一个网络

  test:        对一个模型打分测试 

  device_query:     显示GPU诊断信息

  time:          评估模型执行时间

 

Flags from tools/caffe.cpp:

  -gpu (可选参数,给定时运行在GPU模式,‘-gpu all’ 则表示运行在所有可用的GPU设备上,此时真正训练批量大小是N×B,N为指定的GPU设备的数目)

  -iterations (循环迭代次数,默认为50)

  -model  (指定模型定义文本名,*.prototext)

  -sighup_effect (当收到SIGHUP信号时要采取的动作,可选项:snapshot.stop,或none,默认是snapshot,即拍快照)

  -sigint_effect (当收到SIGINT信号时要采取的动作,可选项同上,默认为stop)

  -snapshot  (恢复训练时所需要指定上次终止的快照,*.solvestate)

  -solver  (指定求解器文本文件吗,*.prototxt)

  -weights (指定用于微调的与训练权值,*.caffemodel,不可与snapshot同时出现)

 

example mnist:

train: caffe train --solve = example/mnist/lenet_solver.prototxt

test:  caffe test -model example/mnist/lenet_train_test.prototxt -weights example/mnist/lenet_iter_10000.caffemodel -iterations 100.

posted on 2017-09-01 16:21  G_Y  阅读(748)  评论(0)    收藏  举报