caffe训练过程中,训练中断之后,如何接着训练?

zxw.sh 

/home/tyn/Downloads/center_loss_caffe/build/tools/caffe train -solver face_solver.prototxt --snapshot=center_loss_model_iter_9000.solverstate -gpu=all 2>&1 | tee double_label_centerloss_20575_0.02_train.log

center_loss_model_iter_9000.solverstate  #从这个模型开始训练

double_label_centerloss_20575_0.02_train.log  #保存的训练日志

感谢陶师姐教会我这么多--虽然在她面前基本上没有叫过师姐

 

有时候caffe在训练的时候,因某种原因不得不暂停训练,下次怎么接着继续训练呢,下列sh脚本文件


#!/usr/bin/env sh

Path=/home/ccf/CCF/data-me

/home/hjxu/caffe-master/caffe/build/tools/caffe train --solver=/home/hjxu/WSI-metastic/data-me/profile/solver.prototxt  \

--snapshot=/home/hjxu/WSI-metastic/data-me/model/caffe_Breast_transfer_train_iter_95000.solverstate 2>&1|tee /home/hjxu/WSI-metastic/data-me/train2.txt


如果已经有了模型,想要第二次加强训练

#!/usr/bin/env sh

Path=/home/ccf/CCF/data-me

/home/hjxu/caffe-master/caffe/build/tools/caffe train --solver=/home/hjxu/WSI-metastic/data-me/profile/solver.prototxt  \

--weights=/home/hjxu/WSI-metastic/data-me/model/caffe_Breast_transfer_train_iter_95000.caffemodel 2>&1|tee /home/hjxu/WSI-metastic/data-me/train2.txt

 

ubuntu下
如果我们在训练途中停电或者有了其他的情况,可以通过之前保存的状态恢复数据,使用的时候直接添加–snapshot参数即可,如:
./build/tools/caffe train --solver=models/bvlc_reference_caffenet/solver.prototxt --snapshot=models/bvlc_reference_caffenet/caffenet_train_iter_10000.solverstate

 

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值