Lessons › Chapter 8: Neural networks
Multilayer networks
Put neurons side by side to make a layer, then stack layers. Every neuron in one layer connects to every neuron in the next. This is a multilayer network.
Watch it move. This lesson is interactive on Gradient Lab: every step is an animated scene you can replay.
Start the interactive lessonStep by step
Reading cheque amounts
Brightbank wants to read handwritten amounts on scanned cheques automatically.
Stack neurons in layers
Put neurons side by side to make a layer, then stack layers. Every neuron in one layer connects to every neuron in the next. This is a multilayer network.
Input, hidden, output
The first layer takes the raw input and the last gives the answer. The layers in between are hidden layers: nobody tells them what to compute; they figure out useful in-between features on their own.
Each layer builds on the last
The first hidden layer might each draw one straight cut through the data. The next layer combines those cuts into corners and regions. Layer by layer, simple pieces become complex shapes.
Deep means many layers
Add more and wider layers and the network can learn astonishingly complex patterns: faces, speech, language. “Deep learning” simply means networks with many layers.
In real life: reading handwritten postcodes
Postal services were among the first big users of neural networks, reading handwritten postcodes on envelopes so letters could be sorted by machine. The same kind of network now reads cheques and forms.
Quick check: Why add hidden layers?
- They build up complex features and curved boundaries (correct)
- They make the network smaller
- They remove the need for training data
Each hidden layer combines the previous layer’s features into richer ones.
Pseudocode
hidden1 = relu(W1 × input + b1) hidden2 = relu(W2 × hidden1 + b2) output = sigmoid(W3 × hidden2 + b3) # each hidden layer builds new features out of the last one
Key terms
- hidden layer
- A layer between input and output. Its neurons build new features.
Build it: A neural network that reads handwriting (35 min, runs in your browser)
See the projectIn the news
Recent models and papers that build on this idea: