Map 1 · Building and training a network · Dense lane · step M2
Stack layers
How do hidden layers create new representations?
Key formula
Fact or figure
Without non-linear activations, any stack of layers collapses to one: .
Skip this step and…
Linear hidden layers add parameters but no expressive power.
Digits example
A 784 → 128 → 10 network has 101,770 parameters, almost all in the first layer.
Learn it
Taught in Section 3 (Multi-layer Perceptrons) of the course. The map follows the deep learning workflow, the order you build a model in; the course teaches in the order that is easiest to learn, so the numbers can jump.
- 3.1 Layers, Matrices and ShapesA multi-layer perceptron stacks layers of neurons. How one layer is written as a matrix product, how to read the shapes, how to count parameters, and the two conventions (lecture vs code) you must not mix.
- 3.2 Solving XOR with a Hidden LayerAn explicit 2–2–1 network that computes XOR, checked for all four inputs. The hidden layer changes the representation so that one output neuron can separate the classes.
- 3.3 Why Depth Helps: Composing RegionsWith threshold neurons, the first layer cuts the space into half-planes, the next combines them into convex regions, and the next into unions of regions. That is the geometric picture of what depth adds.
- 3.4 Why Non-linearity Is EssentialStacking layers without non-linear activations gives nothing new: any stack of linear layers collapses to a single linear layer. The algebra, a numerical check, and the consequence for XOR.
How it connects
Feeds into · Step 4
Choose the activationsNon-linear activations are what make depth useful
Which non-linearity in hidden layers, and which at the output?
Builds on · Dense lane · step M1
Understand the neuronXOR shows why a hidden layer is needed
What can one neuron do, and what can it never do?
Builds on · Foundation
Universal approximationWhy one hidden layer is enough in principle
with one hidden layer