Machine Learning Basics
A model is trained on 10,000 training samples with a mini-batch size (batch size) of 50. How many weight updates are there in one epoch?
- A50
- B200
- C2000
Show answer and explanation
Answer: B. 200
An epoch is the unit of training in which the entire training set has been used once. In mini-batch training, the gradient is computed for each mini-batch and the weights are updated once, so the number of updates per epoch (the number of iterations) is 10000 ÷ 50 = 200. Training for 10 epochs makes 2000 updates in total. Mini-batch training lies between batch training, which updates once using all the data, and online training, which updates after every single sample.
- A. This is the batch size, the number of samples used in one update.
- B. Correct. 10000 ÷ 50 = 200.
- C. This is the total number of updates after 10 epochs of training.