caffe,Inception v2 Check failed: top_shape[j] == bottom[i]->shape(j)
使用Caffe 跑 Google 的Inception V2 对输入图片的shape有要求,某些shape输进去可能会报错。
Inception model中有从conv和pooling层concat的操作,而conv和pooling的output输出计算方式不完全一样。解决方案:
1. 按照原来prototxt输出图片
2. 把concat层前面stride为2的conv层替换stride为1,再额外加上一个stride为2的pooling层
e.g. 以 Inception v2 为例子InceptionBN
conv_3c_3x3, conv_3c_double_3x3_1
conv_4e_3x3, conv_4e_double_3x3_1
然后再接上 stride 为2 的max pooling 层,这样几个分支出来的shape都会保持一致。
layer {
name: "conv_3c_3x3"
type: "Convolution"
bottom: "conv_3c_3x3_reduce"
top: "conv_3c_3x3"
convolution_param {
num_output: 240
kernel_size: 3
stride: 1
pad: 1
}
}
layer {
name: "max_pool_3c_3x3"
type: "Pooling"
bottom: "conv_3c_3x3"
top: "conv_3c_3x3"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
pad: 0
}
}
这是取巧的做法,虽然保持了加载模型参数一致,但是增加了conv操作(stride变小)和多了一层pooling操作,会增加计算量和消耗显存。
caffe,Inception v2 Check failed: top_shape[j] == bottom[i]->shape(j)的更多相关文章
- 配置SSD-caffe测试时出现“Check failed: error == cudaSuccess (10 vs. 0) invalid device ordinal”解决方案
这是由于GPU数量不匹配造成的,如果训练自己的数据,那么我们只需要将solver.prototxt文件中的device_id项改为自己的GPU块数,一块就是0,两块就是1,以此类推. 但是SSD配置时 ...
- npm 走 privoxy 代理经常出现 shasum check failed 的解决办法
今天在下载一个比较大的项目,经常 shasum check failed ,太烦了,于是想切淘宝源,分别尝试 nrm 切换和传递 --registry ,结果都出现 Unexpected end of ...
- 经典分类CNN模型系列其五:Inception v2与Inception v3
经典分类CNN模型系列其五:Inception v2与Inception v3 介绍 Inception v2与Inception v3被作者放在了一篇paper里面,因此我们也作为一篇blog来对其 ...
- caffe 训练时,出现错误:Check failed: error == cudaSuccess (4 vs. 0) unspecified launch failure
I0415 15:03:37.603461 27311 solver.cpp:42] Solver scaffolding done.I0415 15:03:37.603549 27311 solve ...
- caffe: test code 执行出问题: Check failed: FLAGS_weights.size() > 0 (0 vs. 0) Need model weights to score.
Check failed: FLAGS_weights.size() > 0 (0 vs. 0) Need model weights to score. 出现这个错误,但是我记得昨天还好好的, ...
- windows7下解决caffe check failed registry.count(type) == 1(0 vs. 1) unknown layer type问题
在Windows7下调用vs2013生成的Caffe静态库时经常会提示Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer t ...
- 【神经网络与深度学习】Caffe训练执行时爆出的Check failed: registry.count(t ype) == 1 (0 vs. 1) Unknown layer type
自己建立一个工程,希望调用libcaffe.lib ,各种配置好,也能成功编译,但是运行就会遇到报错 F0519 14:54:12.494139 14504 layer_factory.hpp:77] ...
- caffe: test code Check failed: K_ == new_K (768 vs. 1024) Input size incompatible with inner product parameters.
I0327 20:24:22.966171 20521 net.cpp:849] Copying source layer drop7I0327 20:24:22.966179 20521 net.c ...
- caffe运行错误: im2col.cu:61] Check failed: error == cudaSuccess (8 vs. 0) invalid device function
错误: im2col.cu:61] Check failed: error == cudaSuccess (8 vs. 0) invalid device function 原因:由于Makefil ...
随机推荐
- Word Ladder(双向BFS)
2018-10-02 23:46:38 问题描述: 问题求解: 显然是个解空间遍历问题,每次修改其中一位,由于步长是1,所以可以使用BFS进行解空间的遍历.
- Axure 元件的移动效果
元件的移动主要是指当点击某一元件(登录)时,某些元件会发生移动或者是左右移动的动画效果,先将登录界面设置为动态面板,然后再设置动作 本节主要应用于一下三种场景: 1.当邮箱不为空.密码为空时,点击登录 ...
- spring cloud: zuul(三): ribbon负载均衡配置
zuul的routes配置下path/url组合不支持负载均衡 下面介绍zuul的routes配置下的path/serviceId负载均衡配置 spring-boot-user微服务开启了:7901, ...
- c++的const总结
转自:http://www.cnblogs.com/yc_sunniwell/archive/2010/07/14/1777416.html 为什么使用const?采用符号常量写出的代码更容易维护:指 ...
- vue 基础(一)
一 vue.js的M-V-VM思想 MVVM 是Model-View-ViewModel 的缩写,它是一种基于前端开发的架构模式. 1.Model指代的就是vue对象的data属性里面的数据.这里的数 ...
- Tempter of the Bone HDU - 1010
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it u ...
- python记录_day10 动态传参 命名空间 作用域
一.动态传参 动态传参用到 *args 和 **kwargs ,*号表示接收位置参数,args是参数名:**表示接收关键字参数,kwargs是参数名 def chi(*food): print(foo ...
- DP 传球问题
洛谷P1057 传球问题 分析:经过m次传球到第i个人的方法可以由经过m-1次传球到第i个人和到第i-1个人传递得来 设dp[i][j]为经过j次传球后到达第i个人的方法数,可得到状态转移方程为: d ...
- 卸载WPS后怎么WORD的图标还是WPS
在电脑中选择使用Microsoft Office并将之前安装的WPS Office办公软件卸载了.但是卸载之后发现电脑系统中的Word.Excel等文件无法正常显示图标.在这样的情况下,我们应该如何解 ...
- python-flask-wtforms
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...