liveBook · Manning

Convolutional layer

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

Conv2d is a two-dimensional convolution layer that applies learned spatial filters to image-like tensors.

A convolutional layer applies learned spatial filters to image-like tensors, detecting local patterns and producing feature maps. Unlike pooling, it learns pattern detectors rather than selecting values from fixed windows. section 6.2.3

A convolutional layer typically contributes to a visual model in this sequence:

  • Apply filters across the input to detect patterns such as edges, textures, and shapes. section 6.2.3 section 6.5
  • Represent the detected patterns as feature maps, preserving spatial organization. section 6.2.3
  • Combine convolutional layers with pooling layers in contracting paths to reduce spatial dimensions and encode increasingly abstract features. section 6.2.3 section 6.5
  • Use the resulting representations in architectures such as U-Net or convert image patches into token vectors for a vision transformer. section 6.2 section 3.3

Patch projection in a vision transformer

For a 3 × 32 × 32 image divided into an 8 × 8 grid, a convolutional layer converts each 3 × 4 × 4 patch into a 48-value vector, producing 64 tokens. section 3.3

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

How deep it goes
Explains filters, feature maps, and architectural roles, but stops short of deriving convolution numerically or implementing Conv2d from scratch.
Examples
Uses image denoising, U-Net feature extraction, and 32 × 32 image patches projected into 64 token vectors.
What you can do after
Evaluate/understand how learned filters produce feature maps and support downsampling, denoising, and patch-token conversion.
How it connects
Connects convolutional layers with feature maps, max pooling, U-Net, transposed convolution, and vision transformers.

Also explained in

Compare how 14 books explain convolutional layer →

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.