轉載請注明出處:
http://www.cnblogs.com/darkknightzh/p/5946041.html
參考網址:
http://caffe.berkeleyvision.org/tutorial/interfaces.html
http://www.cnblogs.com/denny402/p/5076285.html
1. 如果直接訓練時,test.sh中內容如下:
./build/tools/caffe train --solver=examples/XXX/lenet_solver.prototxt --gpu 1
之后在caffe根目錄輸入如下命令:
sh examples/XXX/test.sh
2. 如果使用預訓練好的模型進行fine tuning,則test.sh中內容如下:
./build/tools/caffe train --solver=examples/XXX/lenet_solver.prototxt -weights examples/models/finetuning.caffemodel --gpu 1
其中finetuning.caffemodel位於examples/models/文件夾內。
=======================================================
170107更新
3. 如果使用快照文件(.solverstate),則可以使用-snapshot參數:
./build/tools/caffe train --solver=examples/XXX/lenet_solver.prototxt -snapshot examples/xxx/snapshot/xxx_iter_5000.solverstate --gpu 1
170107更新結束
=======================================================
之后在caffe根目錄使用sh examples/XXX/test.sh即可。