Padding and Stride

http://d2l.ai/chapter_convolutional-neural-networks/padding-and-strides.html

Hi,

I didn’t quite follow the comment written for the example of valid padding under 6.3.1 padding section. For the valid padding, there shouldn’t be any padding applied if I am not wrong. However, it is written that “padding numbers on either side of the height and width are 2 and 1” is applicable in comment. If padding applied, result will be different than returned by program.

Hi, when talking about padding, I do not understand what exactly do we mean by “If kh is even, one possibility is to pad ⌈𝑝ℎ/2⌉ rows on the top of the input and ⌊𝑝ℎ/2⌋ rows on the bottom.” How can you pad half a row on the top and another one on the bottom? In the example given in the book we ignore this and simply pad one row on both the top and bottom of Figure 6.3.1, increasing the dimension of the output.