Chapter 9
What the network learned.
Every kernel so far was designed by hand or trained on one picture. This chapter opens up a network trained on 60,000 real images and looks at what its kernels ended up doing.
Chapter 2 said a CNN’s kernels start as random numbers and end up as whatever helps with the task. Chapter 7 showed the training that gets them there. What it couldn’t show is what the trained kernels look for, because you can’t tell from the task. Nobody tells the network to find edges or curves. It’s only told whether its answers were right.
So this chapter looks. It uses a real network, trained on tens of thousands of handwritten digits, small enough to run in your browser. Every layer in it comes from an earlier chapter: convolutions, channels, ReLU, max pooling and a dense layer at the end. You can draw a digit and watch it pass through every layer. Then the chapter probes the first and second layers with an input simple enough to reason about, a straight line, and measures how each channel responds as the line turns. The last module looks at where the network gets digits wrong, and at what it does with inputs that aren’t digits at all.
Everything the chapter says about the network was measured, on this network. A network trained again from different random weights would find different kernels, so the specific numbers here describe this one network, not every network.
The digits come from MNIST, by Yann LeCun, Corinna Cortes and Christopher J. C. Burges, used under the Creative Commons Attribution-Share Alike 3.0 license.
Modules
Each module ends in a short knowledge check. Passing it unlocks the next module. Your progress is saved in this browser.