liveBook · Manning

Transposed convolution

As explained in Grokking AI Algorithms, Second Edition

A transposed convolution is a learnable convolutional operation that projects a lower-resolution representation into a higher-resolution output space.

A transposed convolution is a learnable layer that projects a low-resolution feature map into a larger one. Unlike nearest-neighbor interpolation, which duplicates pixels, it uses trainable filters to reconstruct useful detail. section 12.19

The upsampling process works like this:

  • Take one pixel at a time from the small feature map. section 12.19
  • Use a learnable filter to paint a larger patch on the output map rather than producing only one output pixel. section 12.19
  • Repeat the operation for every input pixel and add values where painted patches overlap. section 12.19
  • Learn the filter weights during training so the layer can reconstruct cleaner, more coherent detail. section 12.19

From 4×4 to 8×8

A decoder receives sixteen 4×4 feature maps from a compressed bridge. A transposed-convolution layer enlarges them to sixteen 8×8 maps, carrying image data together with text-label and timestep embeddings. In a simple implementation, a filter size of 4, stride of 2, and padding of 1 produce the doubled spatial dimensions. section 12.19

Figure 12.41 The upsampling layer in our U-Net
12_41

View the U-Net upsampling layer alongside the feature-map transition from compressed representations to larger maps. section 12.19

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Explains filter-based patch painting, overlap accumulation, learned weights, and a small implementation while stopping short of deeper theory.
Examples
Uses nearest-neighbor duplication, an artist reconstruction analogy, and a 4×4-to-8×8 U-Net feature-map example.
What it assumes
Assumes familiarity with feature maps and convolutional layers while introducing the upsampling intuition from pixel duplication.
What you can do after
Builds a basic upsampling layer using filters, stride, padding, output dimensions, and accumulated overlapping contributions.
How it connects
Connects transposed convolution to convolution, nearest-neighbor interpolation, U-Net decoders, skip connections, and diffusion models.

Also explained in

Compare how 5 books explain transposed convolution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.