Skip to content
DoingCamp CS

Make it comfy

Lesson style

Quick mode shows the key picture, a summary and the practice. Good for a refresher.

Theme
Font

Both fonts are designed to be easy to read. Some readers with dyslexia prefer Lexend.

Text size
Spacing
Animations

Lesson 18 of 20 · about 17 min

Gradient descent

Setting both partial derivatives to zero works for the pool site, but a model with a million settings has a million equations. Instead, start anywhere and keep stepping downhill along minus the gradient. That simple loop, gradient descent, trains almost every modern AI. You'll tune the step size until it neither crawls nor explodes, watch it zig-zag down a narrow valley, and see it get stuck in the wrong hollow.

🔓 Unlock this lesson

This lesson is part of the DoingCamp Pass. Members get every lesson in every course, with all the interactive visuals, coding exercises and challenges.

In this lesson you'll learn:

  • Gradient descent
  • Learning rate

Free to try in F09 Calculus for CS:

The first 3 lessons of every course are free, no account needed.