The small non-linear function applied after every neuron — and the reason a deep network can learn anything more interesting than a straight line. Pick the wrong one and your gradients vanish; this is the knob behind several exam questions.
A neuron computes a weighted sum z = w·x + b — that's linear.
Stack two linear layers and you get… still just a linear function (a composition of lines is a line). No
matter how deep, the network could only draw straight boundaries. The activation function squeezes a
bend into each neuron, and that is what lets stacked layers compose into arbitrarily curved
functions. So every activation here is non-linear — including ReLU, which looks like two straight
pieces but has a kink, and a kink is enough.
The blue curve is the function; the amber dashed curve is its derivative — the slope gradients flow through during backprop. Watch where the derivative goes flat:
For multi-class output you need a vector of probabilities that sum to 1. Softmax takes raw
scores (logits), exponentiates, and normalises: softmax(z)ᵢ = e^{zᵢ} / Σ e^{zⱼ}. The output is a
proper probability distribution — every value in (0, 1) and the whole vector adding to 1. Drag the three logits and watch the distribution respond (bigger gap ⇒ more peaked):
Curated companions: TensorFlow Playground (swap activations live) · CS231n notes.