Conv2d and the value of padding

Hello,

I would like to ask about the value of padding we set in the Conv2d function.

I know what zero-padding is. However, what does it mean that the padding is 0 for instance, or 1,2, or 3. What do these values mean? Do they represent the number of columns and rows that will be filled with zeros?

Thanks a lot.

Yes, the padding argument specifies how many rows and columns on each border will be added.
E.g. padding=1 will add one column on the left, right, upper, and lower border.

1 Like