Lesson 12 of 14 6 min · 75 words From lecture slides
Padding
Adding pixels around an image to control output size and keep edge information.
Padding adds extra pixels around the edges of an image before a convolution. It prevents the output from shrinking, makes sure filters cover edge and corner pixels so edge features are preserved, and gives precise control over the output size.
Example: a 5×5 image with a 3×3 filter and no padding gives a 3×3 output; with one pixel of zero padding the output stays 5×5.
Formula to remember
Sigmoid / tanh / ReLU
Ranges (0,1), (−1,1) and [0,∞).
Quick check · +5 XP