Padding and Stride

https://en.diveintodeeplearning.org/chapter_convolutional-neural-networks/padding-and-strides.html

Hi in section 6.3.1 the image size should be 3X3 before pading and 5X5 after padding not 3X5 to 5X7. Correct me if I am wrong.

You are correct. In fact, I think the author uses the padding confusingly here. The padding in code always means on padding on both sides with same number of pixels. Padding = 1 in code actually adds two paddings pixels on that dimension (x or y). I think the author should change his use of the term to the same meaning in the mxnet code