Gradient descent
For engineers
How models learn by stepping downhill on a loss: loss functions, learning rates and schedules, optimizers such as AdamW and reading training curves
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
What is the gradient descent update rule for a weight w?
Check yourself · 2 of 5
Which loss fits a model that predicts tomorrow's delivery time in minutes?
Check yourself · 3 of 5
A loss curve reads 2.3, 2.1, 9.7, 410, NaN. What is the most likely cause?
Check yourself · 4 of 5
What does Adam keep for every weight, besides the weight itself?
Check yourself · 5 of 5
Training loss keeps falling, while validation loss fell until epoch 7 and has risen since. What is this called?
Topics
- Gradient descent steps by hand4 min read · Computing the update rule, weight minus learning rate times gradient, on a one-parameter model to see learning happen
- Choosing a loss function for the task4 min read · Mean squared error, cross-entropy and what each one punishes, and why the loss you train on differs from the metric you report
- Learning rates, warmup and decay schedules5 min read · Rates that diverge, crawl or bounce, and the warmup and cosine decay schedules used to train modern models
- SGD, momentum and Adam optimizers5 min read · Mini-batch stochastic gradient descent, momentum, Adam and AdamW, the usual default for transformers, and the memory their state costs
- Reading loss and validation curves5 min read · Healthy, overfitting, diverging and plateaued runs, loss spikes and NaNs, gradient clipping and when to stop a run
Start here
- Google ML Crash Course: gradient descent (opens in a new tab)CourseFree
Gradient descent on a linear model with the update rule and learning rate shown step by step.
- CS231n: Optimization (opens in a new tab)CourseFree
Stanford notes on loss functions, gradients and numeric checks, with clear intuition.
- PyTorch docs: torch.optim (opens in a new tab)DocsFree
The optimizer API and learning rate schedulers you call in a training loop.
Helps to know first
110 questions · last verified 2026-12