Pooling vs Convolution - Number of Outputs

48 views
Skip to first unread message

tom...@gmx.de

unread,
Aug 8, 2016, 5:21:07 AM8/8/16
to Caffe Users
Hi,

I was wondering why pooling layers are defined differently compared to convolutions. While convolutions round down, pooling layers round up. I find that is an inconsistency which makes many thinks more complicated (e.g. FCN).

Pooling:
pooled_height_ = static_cast<int>(ceil(static_cast<float>(height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;


Convolution:
const int output_dim = (input_dim + 2 * pad_data[i] - kernel_extent) / stride_data[i] + 1;

My propose is replacing the ceil with floor!

Cheers,
Tom

Evan Shelhamer

unread,
Sep 14, 2016, 2:57:34 PM9/14/16
to tom...@gmx.de, Caffe Users

Evan Shelhamer





--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users+unsubscribe@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/05fde386-4fd7-4e67-977f-a8bfa9d9e39c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages