-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Rectangular pooling #614
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
Rectangular pooling #614
Conversation
Add pad_h, pad_w, kernel_size_h, kernel_size_w, stride_h, stride_w to support pooling on rectangle regions.
Replace pad_, kernel_size_, stride_ with pad_h_, pad_w_, kernel_size_h_, kernel_size_w_, stride_h_, stride_w_ to support pooling on rectangle regions.
Replace pad_, kernel_size_, stride_ with pad_h_, pad_w_, kernel_size_h_, kernel_size_w_, stride_h_, stride_w_ to support pooling on rectangle regions.
Replace pad_, kernel_size_, stride_ with pad_h_, pad_w_, kernel_size_h_, kernel_size_w_, stride_h_, stride_w_ to support pooling on rectangle regions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that when kernel_size is specified, the other two are ignored. So why not both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For compatibility issue with previous caffe prototype file, we don't want to require users to update their network prototype. So, the user can either provide one parameter kernel_size or two parameters {kernel_size_w, kernel_size_h}. You may see #505 for detailed reasons.
|
Very useful generalization! Are you interested in further adding support for rectangular images? |
|
Rectangular pooling kernel regions have been added to TestCPUForwardMax, TestGPUForwardMax, TestCPUForwardMaxTopMask, TestGPUForwardMaxTopMask in test_pooling_layer.cpp |
|
Why are the first four commits repeated twice? The two commits with the message "fixing pooling SetUp() to allow default values for stride and pad" had better be squashed into one. |
|
@shelhamer @jeffdonahue would you have a look the changes and see if this PR can be merged? |
|
Hey @ronghanghu, this looks great! Please run |
|
style errors are fixed and gradient checks are added for non-square pooling. |
|
Perfect, thanks Ronghang. |
Rectangular pooling
Rectangular pooling
Implemented rectangular pooling, allowing pooling with different kernel_size, stride and pad along each axis.
Tests on rectangular pooling kernel regions have been added.