Batch size (machine learning)

The number of examples in a batch. For instance, if the batch size is 100, then the model processes 100 examples per iteration.

The following are popular batch size strategies:

  • Stochastic gradient descent, in which the batch size is 1.
  • Full batch, in which the batch size is the number of examples in the entire training set. For instance, if the training set contains a million examples, then the batch size would be a million examples. Full batch is usually an inefficient strategy.
  • Mini-batch stochastic gradient descent, in which the batch size is usually between 10 and 1000. Mini-batch is usually the most efficient strategy.

2024 © ak