Map 1 · Building and training a network · Step 4
Choose the activations
Which non-linearity in hidden layers, and which at the output?
Key formula
Fact or figure
Ten sigmoid layers multiply at most into the gradient: vanishing gradients.
Skip this step and…
Deep sigmoid networks barely train their early layers; ReLU units with a too-high learning rate can die.
Digits example
ReLU in the hidden layers; softmax over the 10 digit classes at the output.
Learn it
Taught in Section 4 (Activation Functions) 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.
- 4.1 Sigmoid, tanh, ReLU and FriendsThe common activation functions side by side: their formulas, ranges and derivatives, where each is used, and why the sign function cannot be trained by gradient descent.
- 4.2 Vanishing GradientsWhy early layers of a deep sigmoid network barely learn: backpropagation multiplies one activation derivative per layer, and sigmoid derivatives are at most 0.25. The numbers, the mechanism and the fixes.
- 4.3 Dying ReLU, Leaky ReLU and ELUReLU solves vanishing gradients for active units but creates a new failure: a unit stuck on the negative side gets zero gradient forever. How it happens and the remedies.
- 4.4 Choosing Activation FunctionsWhich activation to use where: ReLU for deep hidden layers, sigmoid for shallow networks and binary outputs, linear for regression outputs, softmax for multi-class outputs.
How it connects
Feeds into · Step 6
Compute the gradientsEvery backprop step multiplies by the activation derivative
How does each weight learn its share of the blame?
Builds on · Step 2
Prepare the dataBadly scaled inputs saturate sigmoid units
How do I split, scale and encode the data?
Builds on · Dense lane · step M2
Stack layersNon-linear activations are what make depth useful
How do hidden layers create new representations?