A convolutional neural network (CNN) processes grid-like data, especially images, by repeatedly filtering and shrinking it until useful spatial features support a category prediction. It assumes that recognizing an object depends more on its parts than on their exact positions. section 1.31
A CNN works in a repeated pipeline:
- Treats an image as a table of pixel values. section 1.31
- Applies several convolutions, each using small matrices whose values are learned during training. section 1.31
- Combines the filtered results into a new image, then downsamples it by spatially shrinking neighboring values. section 1.31
- Repeats filtering and downsampling so later stages detect increasingly abstract patterns while discarding precise locations. section 1.31
From pixels to a strawberry
Given an image, a CNN might learn filters that blur regions, highlight a color, or detect sharp changes such as diagonal lines. After successive transformations, those patterns support a prediction such as “strawberry.” A 1024 × 1024 image might first shrink to 512 × 512 by averaging groups of neighboring pixels. section 1.31
Figure 1.11 A diffusion model is trained to improve a corrupted image paired with its caption.
A CNN also appears inside conditional diffusion models, where a U-Net-type CNN learns to repair a corrupted image using a text-caption embedding. section 1.32

















