Right/Left distribution of the padding in MXNET



Does anyone know how the padding is distributed in MXNET?
For example (let use 1d to simplify things), if my source size is 8, conv kernel is 4, stride is 2: the padding size will be 3. Will Mxnet pad the source by 1 zero on the left side, and by 2 zeros on the right side (like in TF), or the opposite?
In other word, is the first processed pixel always the top left corner of the source, then stride starts from it, or does it work like in TF (i.e. ~centering strided pixels).
In fact to be even more general, operators could support we specify left/right padding values to be compatible with other implementations.

Thanks a lot in advance!


I think I answered my question by managing myself the padding using the nd.pad() function, which actually supports a tuple for specifying right/left padding sizes.


@alinagithub indeed the ConvND operators only support symmetric padding and I was going to suggest you to use the padding operator if you want to do asymmetric padding.

That is how we handle asymmetric padding from the ONNX spec for example.


Thank you Thomas ! I was actually wondering how ONNX and converters such as MMdnn are dealing with this!