Skip to content
BENIBIX Learn

Batch Size

AI📈 Machine LearningNeural Networks

Also known as Mini-Batch Size, Batch (Machine Learning)

How many examples the model reads before each update. Often 32 or 64.

Think of it like

Think of it like marking tests in piles. You check one pile, fix your notes, then take the next pile.

Example

Lucy has 1,000 examples and a batch size of 100. Each epoch has 10 batches, so the weights get 10 updates per pass.

Why it matters

It changes how fast training runs and how much memory it needs. A batch too big for the chip will not run at all.

Definition

Batch size is how many examples a model looks at before it updates its weights. Training does not use all the data at once. It splits the data into small groups called batches, often 32 or 64 examples each. After each batch, the weights take one step. Bigger batches use more memory, and smaller ones give noisier steps.
Each block is one batch of 100. Every batch ends in one weight update.

Common mistake

Raising the batch size without changing the learning rate. The two work together, so changing one often means changing the other.

Key takeaways

  1. 1
    Examples per step. How many before one update.
  2. 2
    Splits the data. Into many small batches.
  3. 3
    A trade. Bigger needs more memory.

Compare

Learn it properly