Convolution
A fully connected layer treats an image as a shuffled bag of numbers. Convolution builds in two facts about pictures — nearby pixels belong together, and a pattern means the same thing wherever it appears — and pays for them with a tiny, shared kernel.
50 min
After this lesson you can
- Explain why a fully connected layer is wasteful on images, with actual parameter counts
- Compute a 2-D convolution (really a cross-correlation) by hand and in NumPy
- Use the output-size formula for padding and stride, and count a conv layer's parameters with channels
- State translation equivariance precisely and say what pooling adds
- Compute how a receptive field grows with depth and stride
In this lesson
- What goes wrong with a fully connected layer
- The picture: a kernel sliding over an image
- The formula
- Equivariance: move the input, the output moves too
- Stride, padding and the size of the output
- Channels: kernels are really three-dimensional
- Receptive fields: how far can a unit see?
- The code
This lesson is part of Descent Pro
Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.