RECEPTIVE FIELD

Chapter 4

Channels .

A color image is three images stacked. A kernel that reads it has to be three deep.

Until now every image in this book has been grayscale: one number per pixel. Real photos are in color, and the layers inside a CNN pass along stacks of maps, not single maps. This chapter is about those stacks.

It starts by splitting the duck, in color for the first time, into its red, green and blue parts. Then it shows how a kernel reads all three at once, how a layer with many kernels makes many maps, and how the number of maps decides the number of weights. It ends with the smallest kernel there is, 1×1, which ignores neighbors entirely and turns out to be one of the most used layers in modern networks.

Every figure uses the duck at 32×32. Convolutions here stop at every position and use no padding, as in chapter 2, so a 3×3 kernel turns 32×32 into 30×30. Everything from chapter 3 about stride, padding and dilation carries over unchanged: channels don’t affect the width or height of a map.

Modules

  1. 1Color images
  2. 2Kernels with depth
  3. 3Many kernels
  4. 41×1 convolutions

Each module ends in a short knowledge check. Passing it unlocks the next module. Your progress is saved in this browser.

Start with Color images →