caffe 常用命令

1.训练

(1)从头开始训练

./build/tools/caffe train -solver=examples/hands/hands_solver.prototxt -log_dir=examples/hands

(2)利用snapshot继续训练

./build/tools/caffe train -solver=examples/hands/hands_solver.prototxt -snapshot= examples/hands/hands_iter_5000.solverstate

(3)用预先训练好的权重来fine-tuning模型,需要一个caffemodel,不能和-snapshot同时使用

./build/tools/caffe train -solver= examples/hands/hands_solver.prototxt -weights= examples/hands/hands_iter_5000.caffemodel

2.测试

./build/tools/caffe test -model=examples/hands/hands_test.prototxt -weights= examples/hands/hands_iter_10000.caffemodel -gpu=0 -iterations=100

3.显示时间

./build/tools/caffe time -model= examples/hands/hands_train_test.prototxt -gpu=0

这个例子用来在屏幕上显示lenet模型用gpu迭代50次所使用的时间。

4.video-caffe 提取特征

## params
# test.prototxt
# model file
# id of gpu
# batch_size
# mini_batch_num
# prefix file  一定要自己写!!!例子中有格式,不写会提取到0个特征!!
# target feature
./build/tools/predict.bin examples/hands/hands_test.prototxt examples/hands/hands_iter_25.caffemodel 0 16 19 examples/hands/prefix.txt fc8
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值