In the last lesson you built a single neuron: inputs, weights, a bias, an activation. A lone neuron is surprisingly limited — it can only separate its inputs with a single straight cut. Real problems are not that tidy. The fix is almost embarrassingly simple: use more neurons, arranged in layers.
A layer is neurons in parallel
Put several neurons side by side and feed them all the same inputs. Each neuron has its own weights, so each learns to respond to a different feature of the input. Three inputs feeding four neurons gives you four new numbers — a fresh representation of the same data, seen four different ways.
That group of neurons is a layer, and its four outputs become the inputs to the next layer.
A network is layers in sequence
Chain layers together and you have a feedforward neural network:
- the input layer is just the raw numbers you feed in;
- one or more hidden layers transform the data, each reading the layer before it;
- the output layer produces the final answer — one number for a yes/no decision, or several for a choice between categories.
Data flows in one direction, input to output. Running it is called the forward pass, and it is nothing new: at every layer, each neuron computes a weighted sum and an activation, exactly as in the previous lesson. A network is that one computation, tiled across a grid.
Why depth helps
Here is the key intuition. A single layer can only draw straight boundaries. But once the first hidden layer has re-described the data, the next layer draws straight boundaries in that new space — which correspond to curved, intricate boundaries back in the original one. Stack a few layers and the network can carve out almost any shape it needs. This is why "deep" learning is deep: each layer composes on the last.
What we have not explained yet is where the weights come from. So far we have been setting them by hand. In a real network there are thousands to billions of them, and no human sets them — the network learns them from examples. That learning process is the subject of the next lesson, and it comes down to a single idea: measure how wrong you are, then nudge every weight in the direction that makes you a little less wrong.