Learn Before
Deep Learning Minibatch Training Loop
The main training loop for a deep learning model executes a systematic, iterative process to optimize parameters and . During each epoch, the loop passes through the entire training dataset. For every iteration within an epoch, a minibatch is processed. The model computes the loss for this minibatch, averages it over the examples in the batch, and calculates the gradients of the averaged loss with respect to each parameter using . Because the loss is averaged per minibatch, the gradient in the optimization algorithm does not need to be separately divided by the batch size. Finally, the optimization algorithm updates the parameters using the rule . This cycle repeats until the training is complete.
0
1
Tags
D2L
Dive into Deep Learning @ D2L
Related
A model is being trained using an optimization algorithm where parameters are updated by taking a step in the direction opposite to the gradient of a loss function. For a specific parameter, the calculated gradient of the loss is a large negative value (-10.0). If the learning rate is set to a small positive value (0.01), how will this parameter's value change in the next update step?
Diagnosing Training Instability
Calculating a Parameter Update
Deep Learning Minibatch Training Loop