liveBook · Manning

Expansive decoder path

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

An expansive path is the decoder-side portion of a U-Net that increases spatial resolution and reconstructs an image from condensed features.

An expansive decoder path is the decoder-side portion of a U-Net. It increases spatial resolution and reconstructs an image from condensed features produced by the bottleneck. section 6.2.2 section 6.5

Trace reconstruction through the decoder in four stages:

  • Upsample downsampled feature maps through multiple up blocks, restoring their spatial resolution. section 6.5 section 7.1.1
  • Merge decoder features with corresponding encoder features through skip connections, recovering fine-grained details lost during downsampling. section 6.2.2 section 7.1.1
  • Refine the upsampled maps with transposed convolutional and additional convolutional layers. section 6.5
  • Use attention within expansive blocks to emphasize relevant spatial regions and reduce the effect of redundant features. section 7.1.1

Denoising a high-resolution flower image

A noisy flower image passes through the contracting path and bottleneck first. The expansive path then upsamples the condensed representations, combines them with encoder details, and reconstructs the image while the U-Net predicts its noise. section 7.1.1 section 6.2.2

Figure 7.2 The architecture of the denoising U-Net model to generate high-resolution flower images. The U-Net is characterized by its symmetric U-shape, with the contracting path on the left and the expansive path on the right, connected by the bottleneck block at the bottom. The model takes noisy images as inputs and predicts the noise in the images.

Use the symmetric U-shaped diagram to follow the expansive path from the bottleneck upward, including up blocks, skip connections, and attention locations. section 7.1.1

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

How deep it goes
Traces upsampling, transposed convolutions, skip connections, and attention, without detailing layer dimensions or implementation code.
Examples
Uses noisy images and high-resolution flower-image denoising to illustrate reconstruction through up blocks.
What you can do after
Evaluate/understand how decoder upsampling and skip connections restore detail during diffusion-model denoising.
How it connects
Connects the decoder to U-Net, encoder, bottleneck path, skip connections, attention mechanism, 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.