Wahaj
Wahaj

Reputation: 125

output dimensions Mismatch CAFFE-SSD

While calculating the dimensions of the SSD Object Detection pipeline, we found that for the layer named "pool3", with parameters:

pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}

the input dimensions are 75x75x256 (WxHxC) and according to the formula: ( Wout = ( Win − kernel + 2*padding )/stride +1), the output dimension for Width comes out to be, (75-2)/2 = 37.5

However, the paper shows the output size at this point as 38, same is the output of the following code for this network

net.blobs['pool3'].shape 

the answer seems simple that Caffe framework 'ceils' it but referring to this post and this one as well, it should be 'flooring' and answer should be 37

So can anyone suggest how Caffe treats these non-integral output sizes ?

Upvotes: 1

Views: 153

Answers (1)

Harsh Wardhan
Harsh Wardhan

Reputation: 2158

There's something called padding. When the output feature map is not a whole number, the input feature map is padded with 0's. That's a standard procedure though it may not be explicitly mentioned.

Upvotes: 0

Related Questions