Hi All -
I was looking into padding-mode for nn.Conv2d
. In the docs it doesn’t describe the options but in the source code its says
padding_mode (string, optional). Accepted values
zeros
andcircular
Digging deeper, padding mode calls F.pad()
, and F.pad()
has the following options for mode
mode:
'constant'
,'reflect'
,'replicate'
or'circular'
I was originally looking to use “reflect”. Questions:
- is reflect implemented but not in the docs (for
nn.Conv2d
)? - if not implemented, any particular reason?
- i’ve never used “circular” padding before:
- what is it?
- when is it good to use?
- is there general advice on if its best to use zero-padding/circular/reflect?
- what is “replicate” (does it just extend the borders out with the edge values)
Thanks!