One neuron takes a weighted sum and squashes it. What happens when the same two inputs feed three neurons at once, each with its own opinion?
Drag either input. Every neuron computes its own weighted sum from the exact same — they just disagree about which weights and bias to use. Watch the ring around each one: it lights up the moment that neuron's output is positive.
A layer is just several neurons run in parallel on the same input:
- — neuron 's raw weighted sum, before activation.
- — neuron 's own weight vector.
- — neuron 's own bias.
- — the shared input vector fed to every neuron in the layer.
- — neuron 's activation, the layer's output for that neuron.
- Nothing new inside each neuron
is exactly the perceptron's weighted sum, computed once per neuron.
- A layer is several of these in parallel
A layer of 3 neurons on 2 inputs is 3 independent weighted sums, each fed through the same activation.
- Stacking layers builds a network
Feed one layer's outputs into the next layer's inputs, and stack enough of these, and that's a neural network.
Push negative and positive. Some neurons' sums go negative and their ReLU (short for Rectified Linear Unit) output flatlines at exactly 0 — dead for this input, no matter how negative their sum gets. Others stay positive and keep responding linearly. Same inputs, three completely different reactions.
At :
- Neuron A: w = (1, -1), b = 0
, so .
- Neuron B: w = (0.5, 0.5), b = -1
, so its output is .
- Neuron C: w = (-1, 2), b = 0.5
, output .
- Compare the three
Same , fed through three different weight vectors, three completely different answers — that's the entire forward pass.
Set x1 and x2 so neuron B’s output reaches 1.
A "layer" is nothing more than this computation repeated once per neuron, in parallel, on the same input. The next chapter asks the question this one was quietly setting up: if a network is just layers chained together, how do you compute a gradient through the whole chain — not just one neuron's slope?