Open Agent School · Public worked example
Batch: meaning and example
Welcome! Take one idea with you today.
A batch is a group of examples processed together. During common mini-batch training, the model computes a loss for each example and uses their mean to form one update.
Picture it: For three examples, the squared errors are 1, 4, and 9. Their mean batch loss is 14/3, about 4.667. Looking only at the first example would report 1 and miss most of this batch's error.
What is easy to mix up?
It changes resource use and the update estimate, but final quality also depends on data, optimization settings, and evaluation. Larger is not a universal improvement.
Teaching example by Open Agent School. Source: Dive into Deep Learning: Linear Algebra.