Why Do Starting Weights Matter?
Weights begin as random numbers. If they are too big, the signals explode as they move through the layers. If they are too small, the signals vanish. Both stop the network from learning. A good initializer chooses random values with a scale that suits the layer.
Common Initializers
| Initializer | Best with | Notes |
|---|---|---|
glorot_uniform | Sigmoid, tanh, softmax | Keras default for Dense layers |
he_normal / he_uniform | ReLU and variants | Recommended for ReLU networks |
random_normal | Experiments | You choose the standard deviation |
zeros | Biases | Never use zeros for all weights |
Vanishing and Exploding Gradients
- Vanishing gradient: gradients become tiny in early layers, so those layers barely learn. Common with sigmoid and tanh in deep networks
- Exploding gradient: gradients become huge and the loss turns into NaN
Ways to fix them: use ReLU, use He initialization, add batch normalization, use residual connections and clip gradients.
Finding a Good Learning Rate
- Start with 0.001 for Adam and 0.01 for SGD.
- If the loss does not move, try 10 times bigger.
- If the loss jumps or becomes NaN, try 10 times smaller.
- Use a schedule or
ReduceLROnPlateauto lower it during training.
keras.utils.set_random_seed(42).
Conclusion
Good initialization and a sensible learning rate are two cheap ways to make training smoother. Use He initialization with ReLU and try a few learning rates.

