从git上下载了solver.prototxt,trainval.prototxt以及对应的预训练模型inception-resnet-v2.caffemodel。
1、准备训练数据,图片.jpg,train.txt , val.txt 。
2、转化训练数据为lmdb。
3、计算均值文件imagenet_mean.binaryproto,得到三个均值,修改 trainval.prototxt 中对应的mean_value.
4、修改 trainval.prototxt 中 source地址 以及 solver.prototxt中的相关参数。
训练和测试时报错:Check failed: top_shape[j] == bottom[i]->shape(j) (29 vs. 30) All inputs must have the same shape, exc
按照报错的输出日志,修改对应层的 kernel_size: 3 修改成 kernel_size: 2
参考博客:https://blog.csdn.net/chris_zhangrx/article/details/78278488
所用solver.prototxt,trainval.prototxt文件以及预训练模型inception-resnet-v2.caffemodel地址:https://download.csdn.net/download/bankeey/11119839
参考github:https://github.com/revilokeb/inception_resnetv2_caffe 没有deploy文件 可以手动修改
https://github.com/soeaver/caffe-model trainval文件中没有测试source
https://github.com/twtygqyy/Inception-resnet-v2 需要用扩充版本caffe
https://github.com/SnailTyan/caffe-model-zoo/ 文件全,可以训练,需要修改solver里的策略,不然训练效果不好
本文详细介绍了使用Caffe框架进行迁移学习的过程,包括从Git下载solver.prototxt、trainval.prototxt及预训练模型inception-resnet-v2.caffemodel,准备训练数据并转化为lmdb格式,计算均值文件,修改配置文件,解决训练和测试中遇到的错误,以及参考多个开源项目和博客资源。
2671

被折叠的 条评论
为什么被折叠?



