liveBook · Manning

Contracting encoder path

As explained in Build a Text-to-Image Generator (from Scratch)

A contracting path is the encoder-side portion of a U-Net that progressively reduces spatial resolution while learning increasingly abstract feature representations.

A contracting path is the encoder side of a U-Net. It processes a noisy image through convolutional and pooling layers, progressively reducing spatial resolution while extracting increasingly abstract feature representations. section 6.2.2 section 6.5

Trace the path through its main operations:

  • Convolutional layers detect patterns such as edges, textures, and shapes, building feature maps at successive abstraction levels. section 6.2.2
  • Pooling layers reduce feature-map dimensions, improving computational efficiency while encouraging more abstract representations. section 6.2.2 section 6.5
  • The resulting features enter the bottleneck, which holds the smallest spatial dimensions and most condensed image information before reconstruction. section 6.5
  • Skip connections later pass contracting-path features to the expansive path, helping recover fine-grained details lost during downsampling. section 6.5 section 7.1.1

In diffusion denoising, the path receives a noisy image alongside its time step and label. It extracts multiscale features that support noise prediction, while the expansive path uses the encoded information to reconstruct the image. section 6.2.2

High-resolution U-Nets can add attention within the contracting path. Applied to image pixels, scaled dot-product attention weighs spatial regions dynamically and helps select relevant features among redundant skip-connected representations. section 7.1.1

Figure 6.4 The components of the denoising U-Net model

Use the U-Net diagram to follow the contracting path from noisy-image input through convolution and pooling blocks into the bottleneck. section 6.2.2

How Build a Text-to-Image Generator (from Scratch) covers it

How deep it goes
Traces convolution, pooling, abstraction, bottleneck transfer, skip connections, and attention, without specifying implementation code.
Examples
Uses noisy images, feature maps, edges, textures, shapes, and high-resolution flower-image denoising diagrams.
What it assumes
Assumes familiarity with U-Net components, noisy images, convolution, pooling, and image denoising.
What you can do after
Understand how an encoder reduces resolution while preparing abstract features for U-Net reconstruction and denoising.
How it connects
Connects U-Net, convolutional layers, pooling layers, bottleneck, expansive path, skip connections, attention, and diffusion models.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Text-to-Image Generator (from Scratch). The section links point to the parts of the book it draws on.