← Neural NetworksToolsInVisionLearning Center
Classification Loss and Training · Lesson 15

The Neural Network Training Loop

Follow prediction, loss, backpropagation, and weight updates.

Watch the lesson

The Neural Network Training Loop explained visually

2:17

Train a delivery robot through the complete cycle that improves a neural network.

Lesson overview

What you will learn

Connect classification losses with the complete training loop, batches, epochs, and convergence.

  1. Forward pass
  2. Measure and trace the error
  3. Update the weights
  4. Repeat with purpose
01

Forward pass

Input moves through the network to produce a prediction. The robot may predict whether a path is safe.

02

Measure and trace the error

A loss function compares the prediction with the truth. Backpropagation calculates how each parameter contributed to that error.

03

Update the weights

An optimizer changes the weights using the gradients. The learning rate controls whether each correction is cautious or aggressive.

04

Repeat with purpose

Forward pass, loss, backpropagation, and update repeat across examples until the model makes safer decisions.

Knowledge check

Quick check: test your understanding

What happens during a forward pass?

The network produces a prediction.

What does backpropagation calculate?

How parameters contributed to the loss.

What controls update size?

The learning rate.

Accessible referenceLesson 15 transcript334 words · Matches the published narration and captionsOpen transcript

A loss function tells a neural network how wrong its prediction was. Training uses that information to make the next prediction better. Imagine a small delivery robot learning to follow a path through a neighborhood. First comes the forward pass. The robot's camera image enters the neural network. Information moves through each layer until the network predicts a steering direction.

The robot may predict that it should turn sharply right, while the correct path requires only a slight turn. Next comes loss calculation. The loss function compares the predicted steering value with the correct value. A large difference produces a larger loss. Now the network needs to discover which internal connections contributed to that error.

Backpropagation carries information about the error backward through the network. Each weight receives a gradient. The gradient indicates how changing that weight would affect the loss. Gradient descent then updates the weights. The basic rule says that the new weight equals the old weight minus the learning rate multiplied by the gradient.

Think of each weight as an adjustable control inside the robot. The gradient identifies the direction to turn the control. The learning rate decides how far to turn it. A very small learning rate can make improvement slow. A very large learning rate can cause the model to overshoot and behave unpredictably.

After updating the weights, the robot performs another forward pass. Its new prediction may come closer to the correct path. The network calculates the loss again, sends the error backward, and adjusts the weights once more. This cycle repeats across many training examples. Forward pass. Loss calculation. Backpropagation. Weight update.

With repeated practice, useful connections become stronger, unhelpful connections change, and the average loss begins to decrease. The neural network does not understand the road as a person does. It improves by repeatedly measuring its error and adjusting the numerical weights that produced it. But how much training data should the network process before each update? That choice leads us to samples, batches, and epochs.