Plain ReLU outputs zero for every negative input, and its gradient there is zero too. A unit that drifts negative across the whole training set stops receiving gradient entirely and never recovers — a dead neuron.
Leaky ReLU leaves a small slope on the negative side so something always flows back:
1f(x) = x if x > 02f(x) = alpha*x otherwise
Task: write leaky_relu(values, alpha) applying this element-wise, rounded to 4 decimal places.
alpha is typically small, around 0.01, but your code shouldn't assume any particular value.alpha * 0 is 0 either way.The leak is a slope, not an offset. Negative inputs stay negative and stay ordered, so the unit keeps some information about how negative its input was rather than collapsing it all to a single zero.