Padding for convolutions

The padding option appends zeros before the convolution (in the input), pretty much like SAME option in TF.
If you want, you can also use F.pad with reflect or replicate mode, with you don’t want to pad the input with zeros.

6 Likes