Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which caffe version supports ceil_mode in Pooling? #1

Closed
quietsmile opened this issue Feb 16, 2017 · 12 comments
Closed

Which caffe version supports ceil_mode in Pooling? #1

quietsmile opened this issue Feb 16, 2017 · 12 comments

Comments

@quietsmile
Copy link

Nice work!
However, I found that ceil_mode is not supported in the master version of caffe.
Is there an open-sourced caffe version that supports ceil_mode in pooing? Thanks.

@shicai
Copy link
Owner

shicai commented Feb 16, 2017

@quietsmile pls see: https://github.com/BVLC/caffe/pull/3057/files
just add several lines of code.

@quietsmile
Copy link
Author

Oh, this is interesting. I mean, is it compatible with cudnn_pooling implementation? Or, just to make the output a little bit larger, even though the elements in the last row/col may still be zeros?

Thanks.

@shicai
Copy link
Owner

shicai commented Feb 16, 2017

As i know, cudnn does not support ceil mode, but you'd better check cudnn manual by yourself.
I use caffe's own pooling layer to support ceil mode.

@oujieww
Copy link

oujieww commented Sep 21, 2017

can anyone sent me your caffe? I don't know which version of caffe should be used. I have tried to use a order version without working.But the new caffe didn't have vision_layers.hpp . I don't know what to do.please help me.

@Sarah635
Copy link

New version doesnot have vision_layers.hpp. In new version the file pooling_layer.hpp is to be modified.

@JinmingZhao
Copy link

@Sarah635 I have the same problem ,how to modify on the new version?

@Sarah635
Copy link

https://github.com/BVLC/caffe/pull/3057/files

Follow this link. Add the + lines and delete the - lines.

Instead of file vision_layers.hpp,, modify the file pooling_layers.hpp. Modify these 3 files i.e. pooling_layers.hpp, pooling_layers.cpp and caffe.proto according to link above and you are done.

@JinmingZhao
Copy link

@Sarah635 Thank you very much, done!

@XUYUNYUN666
Copy link

@Sarah635 Thank you very much, done!

Need I change the code of pooling layer.cu? Thank U.

@keerthanss
Copy link

keerthanss commented Feb 26, 2019

With the latest version of Caffe, you can also get around this by replacing "ceil_mode: false" with "round_mode: FLOOR". No editing of Caffe source code necessary. Refer BVLC/caffe#6282 .

@lijiansong
Copy link

@keerthanss
When I run DenseNet-201, I get the following error, it seems that caffe fail to parse the DenseNet_201.caffemodel

layer[1002].clip_param.max
F1118 11:10:19.095713 30557 upgrade_proto.cpp:97] Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter file: DenseNet_201.caffemodel
*** Check failure stack trace: ***
    @     0x7f3e5d2af5cd  google::LogMessage::Fail()
    @     0x7f3e5d2b1433  google::LogMessage::SendToLog()
    @     0x7f3e5d2af15b  google::LogMessage::Flush()
    @     0x7f3e5d2b1e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f3e5da70731  caffe::ReadNetParamsFromBinaryFileOrDie()
    @     0x7f3e5da9b4fa  caffe::Net<>::CopyTrainedLayersFromBinaryProto()
    @           0x4091ff  test()
    @           0x407310  main
    @     0x7f3e5c21f830  __libc_start_main
    @           0x407b39  _start
    @              (nil)  (unknown)

@mrgransky
Copy link

@keerthanss I tried both ceil_mode: false and round_mode: FLOOR for deploy.prototxt file in DenseNet161 in caffe-gpu installed via conda, I get the error explained here: #37 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants