I’ve 2 doubts in the official formula for calculating shape of output after applying 2d convolutional operation :
- Why do we add 1 and take floor, why don’t just take ceiling ?
- Why do we add 1 in the numerator ?
I’ve 2 doubts in the official formula for calculating shape of output after applying 2d convolutional operation :
floor
+ 1 is different to ceil
for the case of a zero, which is needed in the calculation:
floor(0) + 1 = 1
, while ceil(0) = 0
We subtract 1
in the numerator. Have a look at the Conv arithmetic to derive the formula. Basically if you reformulate the dilated conv output shape formula, you’ll get to the one used in the PyTorch docs.