caffe命令及其参数解析
2017-06-27 14:36
429 查看
caffe程序的命令行执行格式如下:
<command>包含如下四种:
train————(训练或finetune模型(model))
test————(测试模型)
device_query————(显示gpu信息)
time————(显示程序执行时间)
<args>参数包含:
-solver
-gpu
-snapshot
-weights
-iteration
-model
-sighup_e
4000
ffect
-sigint_effect
-solver:必选参数。一个protocol buffer类型的文件,即模型的配置文件。如:
-gpu: 可选参数。该参数用来指定用哪一块gpu运行,根据gpu的id进行选择,如果设置为'-gpu all'则使用所有的gpu运行。如使用第二块gpu运行:
-snapshot:可选参数。该参数用来从快照(snapshot)中恢复训练。如:
-weights:可选参数。用预先训练好的权重来fine-tuning模型,需要一个caffemodel,不能和-snapshot同时使用。如:
-iterations: 可选参数,迭代次数,默认为50。
-model:可选参数,定义在protocol buffer文件中的模型。也可以在solver配置文件中指定。
-sighup_effect:可选参数。用来设定当程序发生挂起事件时,执行的操作,可以设置为snapshot, stop或none, 默认为snapshot
-sigint_effect: 可选参数。用来设定当程序发生键盘中止事件时(ctrl+c), 执行的操作,可以设置为snapshot, stop或none, 默认为stop
test参数用在测试阶段:
time参数用来显示程序运行时间:
这个例子用来在屏幕上显示lenet模型迭代10次所使用的时间。包括每次迭代的forward和backward所用的时间,也包括每层forward和backward所用的平均时间。
利用给定的权重,利用第一块gpu,迭代10次lenet模型所用的时间。
device_query参数用来诊断gpu信息。
caffe <command> <args>
<command>包含如下四种:
train————(训练或finetune模型(model))
test————(测试模型)
device_query————(显示gpu信息)
time————(显示程序执行时间)
<args>参数包含:
-solver
-gpu
-snapshot
-weights
-iteration
-model
-sighup_e
4000
ffect
-sigint_effect
-solver:必选参数。一个protocol buffer类型的文件,即模型的配置文件。如:
./build/tools/caffe train -solver examples/mnist/lenet_solver.prototxt
-gpu: 可选参数。该参数用来指定用哪一块gpu运行,根据gpu的id进行选择,如果设置为'-gpu all'则使用所有的gpu运行。如使用第二块gpu运行:
./build/tools/caffe train -solver examples/mnist/lenet_solver.prototxt -gpu 1
-snapshot:可选参数。该参数用来从快照(snapshot)中恢复训练。如:
./build/tools/caffe train -solver examples/mnist/lenet_solver.prototxt -snapshot examples/mnist/lenet_iter_5000.solverstate
-weights:可选参数。用预先训练好的权重来fine-tuning模型,需要一个caffemodel,不能和-snapshot同时使用。如:
./build/tools/caffe train -solver examples/solver.prototxt -weights models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
-iterations: 可选参数,迭代次数,默认为50。
-model:可选参数,定义在protocol buffer文件中的模型。也可以在solver配置文件中指定。
-sighup_effect:可选参数。用来设定当程序发生挂起事件时,执行的操作,可以设置为snapshot, stop或none, 默认为snapshot
-sigint_effect: 可选参数。用来设定当程序发生键盘中止事件时(ctrl+c), 执行的操作,可以设置为snapshot, stop或none, 默认为stop
test参数用在测试阶段:
./build/tools/caffe test -model examples/mnist/lenet_train_test.prototxt -weights examples/mnist/lenet_iter_10000.caffemodel -gpu 0 -iterations 100
time参数用来显示程序运行时间:
./build/tools/caffe time -model examples/mnist/lenet_train_test.prototxt -iterations 100
这个例子用来在屏幕上显示lenet模型迭代10次所使用的时间。包括每次迭代的forward和backward所用的时间,也包括每层forward和backward所用的平均时间。
./build/tools/caffe time -model examples/mnist/lenet_train_test.prototxt -weights examples/mnist/lenet_iter_10000.caffemodel -gpu 0 -iterations 10
利用给定的权重,利用第一块gpu,迭代10次lenet模型所用的时间。
device_query参数用来诊断gpu信息。
./build/tools/caffe device_query -gpu 0
相关文章推荐
- caffe命令及其参数解析
- caffe命令及其参数解析
- caffe 进行卷积神经网络训练的命令参数解析
- caffe 命令及参数解析
- Caffe命令参数解析
- uboot传入的linux启动参数解析。命令行
- 解析ANDROID ps命令执行后各项参数的含义
- Scala深入浅出进阶经典 第61讲:Scala中隐式参数与隐式转换的联合使用实战详解及其在Spark中的应用源码解析
- Caffe中文件参数设置(三):激活层(Activiation Layers)及其参数设置
- C语言实现命令带参数的解析
- explorer 命令参数及其应用
- gcc命令参数解析1
- 薛开宇学习笔记二之总结笔记--caffe imagenet训练中train_val.prototxt中数据层及其参数设置
- Caffe学习笔记(一):Caffe架构及其模型解析
- asterisk dial 命令参数解析
- caffe 实战系列:proto文件格式以及含义解析:如何定义网络,如何设置网络参数(以AlexNet为例)
- grep命令的参数及其详解
- linux Shell : Test命令参数解析
- C语言main函数的参数及其返回值详细解析
- Shell Test命令参数解析