A convolution kernel, also called a filter, is a small grid of learned weights that looks for a local pattern in an image. Think of it as a tiny magnifying glass: one filter may become sensitive to vertical edges, while another responds to textures. A common size is 3×3. The network starts with random weights and adjusts them during training rather than being told which patterns to find. section 12.14
To use a filter, place it over a patch of pixels. Multiply each weight by the pixel beneath it, then add the results. That sum becomes one value in a feature map—a grid showing where the filter responds. Slide the same filter across the image and repeat. section 12.14
One small calculation
For one row, suppose the filter weights are [2, 7, 2] and the pixels beneath them are [11, 2, 1]. Their contribution is (2×11) + (7×2) + (2×1) = 38. A full 3×3 calculation also includes the other two rows. The filter then moves to the next position and performs the calculation again. section 12.14
Figure 12.24 How a CNN filter scans an image
See how a small filter moves across an image, producing a calculation at each position. section 12.14
Different filters produce different feature maps. In a U-Net encoder example, eight distinct 3×3 filters scan an 8×8 noisy image, producing eight 8×8 feature maps. Each filter also has a learnable bias added to its calculated values. Padding around the image lets the filters calculate values at its edges while keeping these feature maps 8×8. section 12.17 section 12.17
Filter size and movement also affect resolution. The first encoder convolution uses a 3×3 filter with a one-pixel stride; a later downsampling convolution uses 4×4 filters with a two-pixel stride. In the decoder, a transposed convolution uses trainable filters differently: each input value contributes a larger patch to the output, and overlapping contributions are added. section 12.17 section 12.19
The practical takeaway: a kernel is not a fixed edge-finding rule. It is a reusable set of weights whose responses help a convolutional network extract useful image features—or, in a transposed convolution, help enlarge a feature map. section 12.14 section 12.19










