Training & Optimization

Layer 1 · Intuition

Training & Optimization

What 'training a model' actually means: nudging parameters downhill until predictions get good.

5 min read40 XP

Training is walking downhill on a loss landscape, one small step at a time.

A freshly initialized neural network makes essentially random predictions. 'Training' is the process of adjusting its millions of parameters, little by little, so its predictions get closer to correct. The tool that decides which direction to nudge each parameter is called gradient descent.

The loss: a single number for 'how wrong'

A loss function compresses the entire gap between prediction and truth into one number. Training is nothing more than repeatedly asking: 'if I nudge each parameter slightly, does the loss go up or down?' and moving in the direction that decreases it.

  1. Forward pass

    compute prediction

  2. Compute loss

    how wrong was it?

  3. Backward pass

    compute gradients

  4. Update weights

    step downhill

The training loop, repeated millions of times over a dataset.

Check your understanding

4 questions · answer all to submit

  1. 1.In machine learning, what does a loss function fundamentally represent?

  2. 2.What specifically defines the 'learning rate' within the context of training a machine learning model?

  3. 3.What fundamental computation occurs during the 'backward pass' phase of a neural network training iteration?

  4. 4.What term refers to one complete iteration through the entirety of a training dataset in machine learning?