internalsGet Pro

Module 09 · Lesson 5 of 11Pro

Weight initialization and unstable gradients

Level
Intermediate
Topic
Neural networks
Reading time
16 min

When you finish this page you can

  1. Work out how much one layer grows or shrinks the spread of its outputs, from its number of inputs and the spread of its starting weights.
  2. Explain why PyTorch’s default start shrinks the signal in a deep ReLU network, and why the gradient shrinks with it.
  3. Choose between Xavier and Kaiming initialization from the activation function, and set either in PyTorch.
  4. Measure each layer’s spread at step 0, and use gradient clipping to guard against gradients that explode later.

Builds on 3 lessons

Start with lesson 113 min
  1. Neurons and layers: the building blocks13 min
  2. Backpropagation: how neural networks learn17 min
  3. Learning rate: step size and stability14 min

Twenty layers, one score for everyone

is our example online store. Every Monday, Joseph’s growth team sends ₹100 vouchers to the 20,000 customers most likely to . Farah, an ML engineer, builds the model that ranks them from 12 features per customer, in a notebook sample of 200,000 customers.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan