Convolution windows near an input’s edges have fewer valid positions, so the output feature map can shrink. Padding adds rows and columns around the input, allowing windows to be centered at every input location and preserving spatial dimensions. section 8.1.1
A 5 × 5 feature map
A 3 × 3 window fits at only nine centered positions without padding, producing a 3 × 3 output. Adding one row and column on each side allows 25 window positions. In Conv2D, `valid` means no padding; `same` pads to preserve input width and height. The default is `valid`. section 8.1.1
Figure 8.6 Padding a 5 × 5 input to be able to extract 25 3 × 3 patches
See how padding a 5 × 5 input enables 25 extracted 3 × 3 patches. section 8.1.1


















