Mean and Sum Reductions of Training Loss
A training objective can sum or average losses across examples. The reduction changes gradient scale and batch-size dependence.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a short batch
Losses 2, 1, and 3 give sum six and mean two. If every example is repeated and no other term changes, the sum doubles while the mean stays two. Weighted averaging determines how unequal batches combine.
Trace one update
If all example gradients are summed rather than averaged, a fixed learning rate may apply a larger step. See gradient descent updates.[1]