-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Added global_pooling to set the kernel size equal to the bottom size #1214
Conversation
If it is not too much trouble - maybe we should extend it a little bit so that it not only does global pooling, but "spatial pooling" of various input sizes? For example, we can do 2x2 spatial pooling so that the output would be 2x2 regardless of the input shape. |
@Yangqing and anyone interested in binned / spatial pyramid pooling please see the discussion in #1210 starting withhttps://github.com//issues/1210#issuecomment-57723907. I think it is best to start with this special case that's useful now then come up with a plan for full-blown SPP since everything else is just a case of that. We should check if the SPP authors will release their own Caffe layer code + include SPPnet in the model zoo too, since there is plenty of interest. |
Sure, that sound good :) |
I think it would be better to create binding pooling first and then the Sergio 2014-10-03 11:59 GMT-07:00 Yangqing Jia notifications@github.com:
|
@sguada this should work in most cases but to be exactly right shouldn't the kernel size take into account padding too? |
@shelhamer I wasn't sure what to do with padding, I see three options:
I don't mind which one we take. |
Let's disallow padding and stride != 1 when global pooling: there's no point in padding or stride when the purpose is to cover the whole input in a single pool. Please add checks for padding and stride then merge -- this looks good to me. |
Added check for padding and stride with global_pooling
Add global_pooling to cover the whole input by setting kernel size to bottom size
Thanks Sergio! |
Add global_pooling to cover the whole input by setting kernel size to bottom size
Add global_pooling to cover the whole input by setting kernel size to bottom size
whats the use of global pooling ? I couldnt find any meaningful comments in the source codes! |
It allows to do global pooling over the height x width of the bottom blob. So we omit the kernel_size which gets equal to bottom.
Given that the #594 allows on-the-fly resizing of the blobs, this would resize the kernel_size accordingly to the size of the bottom.