A U-Net is a U-shaped convolutional neural network for image-to-image tasks. It compresses an image into an abstract summary, then reconstructs it while preserving fine spatial details through skip connections. section 12.15
Its main parts divide the work between understanding the image and rebuilding it:
- Encoder or downsample path: shrinks feature maps to capture high-level context, such as recognizing that an image contains a face. section 12.15
- Bridge or bottleneck: processes the most compressed and abstract representation at the bottom of the U-shaped path. section 12.15
- Decoder or upsample path: expands feature maps with transposed convolutions and reconstructs full-resolution output. section 12.15
- Skip connections: pass early, high-resolution features directly to matching decoder layers, combining precise location information with abstract meaning. section 12.15
Denoising an 8×8 image
During diffusion training, the U-Net receives an 8×8 noisy matrix and predicts the exact noise added to the clean image. It first summarizes the image to understand its essence, then reconstructs it while removing the predicted noise. During generation, the trained network starts with pure noise and denoises it step by step until a clean image emerges. section 12.16 section 12.23
Figure 12.27 The U-Net architecture
Use the architecture figure to trace the encoder, bottleneck, decoder, and skip connections across the U-shaped network. section 12.15




