Conv2d and the value of padding
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.

As the documentation states:


  padding controls the amount of implicit zero-paddings on both sides for padding number of points for each dimension.


Therefore, padding=1 means you pad your input with 1 column and row from each size.
If you want more control over the amount of padding and its value you can either use a Padding layer, or the pad functional.
