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

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.

主站蜘蛛池模板: 通江县| 台东县| 满城县| 贵溪市| 沙坪坝区| 灯塔市| 额尔古纳市| 庄河市| 甘孜县| 缙云县| 旅游| 鄂托克前旗| 丹寨县| 兴业县| 香格里拉县| 新津县| 万载县| 中西区| 无为县| 疏勒县| 丰镇市| 合川市| 禄劝| 信阳市| 威宁| 临猗县| 浦县| 涞水县| 新疆| 南江县| 威海市| 泾源县| 台湾省| 苏尼特右旗| 福建省| 泌阳县| 托克托县| 和林格尔县| 通化市| 且末县| 九寨沟县|