Comments (8)
All the pre-train models fit 224x224 input, you just need to modify the deploy file's input layer to 224x224.
from caffe-model.
I download this https://pan.baidu.com/s/1c6D150 inception_v4 caffemodel. my datasets is face,so my data size is 11296 and 160132(trained use small centerloss model). i try 224224 size, the result not well. until now the best result is 160132 size.
today i want try inception_v4 model to train my face data (size 160*132). when i train, has error "Check failed: top_shape[j] == bottom[i]->shape(j)". i try many size, the most small size is 239x239 can run. if i train from premodel the size must 299x299 can run.
Thank you very much for your reply!
from caffe-model.
This error is caused by the different feature maps rounding methods of the convolution layer and the pooling layer in caffe.
I think https://github.com/BVLC/caffe/pull/3057/files may be useful for you
from caffe-model.
路过,其实LZ可以用中文问,应该没问题的。。。
(@yja1 you can ask your questions in Chinese...)
引起这个问题的根本原因在于Inception的精细设计,和原始Caffe之间的一小点不兼容。
Caffe的Conv在计算Feature Map的时候使用floor函数取整,而Pooling是使用ceil函数取整。
Inception虽然是全卷积的网络,但是其精细的设计(Conv和Pooling并行降采样Concat),要求在输入的时候要求Input size尽量是32x+43这样的一个数值(对应299的输入,x=8)。在Caffe中,当输入不是这样数值的时候,Conv和Pooling并行降采样时候,输入大小相同,但是取整函数不同导致输出大小不相同,所以报shape的错。
所以,PR3057在考虑对以往Caffe兼容性的前提下,给Pooling层引入一个新的参数ceil_mode(默认true兼容以前的模型),来判断Pooling的时候到底是采用floor还是ceil取整。这样可以更好地处理TensorFlow和Torch训练转换过来的模型(因为它们的Pooling默认是用floor取整的)。
from caffe-model.
@shicai 哈哈,确实中文问就好了
caffe这点确实很烦人,感谢你的补充
from caffe-model.
可以跑了。谢谢啦~ (我问的时候还寻思呢,是用中文呢,让大神去翻译再回答,还是用自己的农村英语呢)
from caffe-model.
@soeaver @yja1 您好!我在训练inception-v4时并没有报这个错误,但是在测试阶段却报:
Check failed: top_shape[j] == bottom[i]->shape(j) (25 vs. 26) All inputs must have the same shape, except at concat_axis.
按照https://github.com/BVLC/caffe/pull/3057/files的方法修改并重新编译caffe后还是报同样的错误,我的input size为224*224,这是为什么呢
from caffe-model.
是否要将设置ceil_mode改为false呢?在哪修改呢?
from caffe-model.
Related Issues (20)
- for xception training solver
- inception-v3 get 0% accracy on ILSVRC2012_val.txt? HOT 5
- 你好!问一下目标检测网络R-FCN的问题 HOT 8
- why resnet18-priv outperforms others' implementations so much???
- Can you provide `solver.prototxt` for training pspnet_resnet101?
- Caffemodel files HOT 4
- NASNet caffemodel HOT 1
- multigrid
- ohem
- where is the default location of log file?
- pytorch-cls link is down
- unable to change the size of image size in inceptionv4 model
- issue
- 在哪里可以下载到用于 faster rcnn的DPN预训练模型呢?
- Bug: Incorrect Implementation of Inception_v4 Net in .prototxt file!
- For getting more accuracy in faster rcnn , which parameters i have to tune (tuning parameters)
- Google Drive links broken
- caffemodel without loss layer
- Xception Google Drive link?
- Google drive link broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caffe-model.