Check failed: ShapeEquals(proto) shape mismatch (reshape not set)
来源:互联网 发布:arm linux 开机启动 编辑:程序博客网 时间:2024/06/05 19:15
在用fast rcnn训练自己的数据集的时候,出现了Check failed: ShapeEquals(proto) shape mismatch (reshape not set) 的问题。
起初以为是图像尺寸的原因(所有的图像都是统一尺寸,但是是640*480的),后来在网上找解决方案的时候,看到有人说可能是由于调整了网络结构导致的。然后将预训练模型换成用imagenet预训练好的模型以后,果然问题解决了。
(刚开始用的预训练模型时作者训练好的21个类别的模型,而不是在imagenet上面预训练好的1000个类别的模型)
由于自己在修改模型的时候只修改了模型内的参数(如类别个数,输出单元个数,输入图像通道等),并没有修改了参数的层,因此,加载模型的时候会出现模型层名相同,而参数对不上的现象,导致出现ShapeEquals(protocol) shape mismatch (reshape not set)的问题。
猜想,fast rcnn训练时并没有采用在imagenet上预训练好的模型所有层(比如全连接层),因此在加载预训练模型后,只加载层名相同的参数,而对于fast rcnn中有而预训练模型中没有的(或者说是不同名的)层,在加载预训练模型后对这些层的参数会随机初始化,达到fine-tune的目的。
阅读全文
0 0
- Check failed: ShapeEquals(proto) shape mismatch (reshape not set)
- 运行caffe出现"shapeequals(proto) shape mismatch (reshape not set)"的可能原因即解决方法
- Check failed: proto.SerializeToOstream(&output)
- shape与reshape
- reshape 与 shape
- Check failed: shape[i] >= 0 (-1 vs. 0)错误
- caffe 训练模型时出错 caffe-parallel has a bug: Check failed: proto.SerializeToOstream(&output)
- LeetCode 645 Set Mismatch
- 645. Set Mismatch
- leetcode 645. Set Mismatch
- [LeetCode]645. Set Mismatch
- 【LeetCode】645. Set Mismatch
- 645. Set Mismatch
- leetcode645. Set Mismatch
- LeetCode 645. Set Mismatch
- 645. Set Mismatch
- leetcode 645. Set Mismatch
- Leetcode 645 Set Mismatch
- Linux网络配置
- 搭建SVN服务器详细教程
- MySQL主从复制
- C# 异常处理
- DnCNN读书笔记
- Check failed: ShapeEquals(proto) shape mismatch (reshape not set)
- 持久化用户操作
- python-lambda
- Java面向对象习题
- Android中系统状态栏的隐藏和显示
- git 代码到本地的方式
- arcgis engine入门体会(一)
- 在elazarl的goproxy中使用圈圈
- 固定映射的线性地址