What Is Mini-Batch Gradient Descent?

Mini-batch gradient descent trains models on small groups of examples at a time. This guide explains the math, the trade-offs, batch-size selection, and working NumPy and PyTorch implementations.