liveBook · Manning

Upsampling

As explained in Grokking AI Algorithms, Second Edition

Upsampling is the process of increasing the spatial resolution of a structured representation such as an image or feature map.

Upsampling increases a feature map’s spatial resolution. In a decoder, it enlarges compressed 4×4 maps to 8×8 maps so the network can reconstruct image details. section 12.19

Two common approaches illustrate the trade-off:

  • Nearest-neighbor interpolation duplicates each pixel into a 2×2 area, providing a fast, straightforward way to double resolution. section 12.19
  • Transposed convolution applies learned filters to each input pixel, painting larger patches whose overlapping values are added together. section 12.19

From 4×4 to 8×8

Imagine giving a small feature map to an artist. Interpolation copies its marks, while a transposed convolution learns brushstrokes that add coherent detail. A U-Net decoder can then produce sixteen 8×8 feature maps. section 12.19

Figure 12.40 Simplistic upsampling with nearest neighbor interpolation
12_40

Use the nearest-neighbor visualization to see how each small-map pixel expands into a 2×2 region. section 12.19

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Explains pixel duplication, learned patch projection, overlap addition, and a NumPy-style implementation, without covering training details.
Examples
Uses 4×4-to-8×8 feature maps, pixel duplication, an artist analogy, diagrams, and transposed-convolution pseudocode.
What it assumes
Assumes feature maps and convolutional layers while making the resolution-change intuition concrete.
What you can do after
Build it from scratch using array operations for transposed convolution and connect the resulting maps to decoder reconstruction.
How it connects
Connects upsampling with U-Net, transposed convolution, nearest-neighbor interpolation, convolution, and skip connections.

Also explained in

Compare how 4 books explain upsampling →

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.