官术网_书友最值得收藏!

Getting ready

To understand the reason batch size has an impact on model accuracy, let's contrast two scenarios where the total dataset size is 60,000:

  • Batch size is 30,000
  • Batch size is 32

When the batch size is large, the number of times of weight update per epoch is small, when compared to the scenario when the batch size is small.

The reason for a high number of weight updates per epoch when the batch size is small is that less data points are considered to calculate the loss value. This results in more batches per epoch, as, loosely, in an epoch, you would have to go through all the training data points in a dataset.

Thus, the lower the batch size, the better the accuracy for the same number of epochs. However, while deciding the number of data points to be considered for a batch size, you should also ensure that the batch size is not too small so that it might overfit on top of a small batch of data.

主站蜘蛛池模板: 嘉峪关市| 香港 | 上高县| 西华县| 景泰县| 巴东县| 铜梁县| 武穴市| 融水| 贡觉县| 兴仁县| 丰顺县| 中牟县| 池州市| 银川市| 抚宁县| 清原| 靖州| 将乐县| 富民县| 德兴市| 华亭县| 荆门市| 垣曲县| 中方县| 乳源| 台中县| 虞城县| 广州市| 和静县| 千阳县| 南投市| 沁源县| 泊头市| 厦门市| 甘洛县| 铜梁县| 芦山县| 县级市| 龙胜| 来宾市|