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

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.

主站蜘蛛池模板: 定安县| 平定县| 霍城县| 津市市| 罗定市| 新疆| 建水县| 凌云县| 紫阳县| 延边| 庐江县| 赤壁市| 桂林市| 白朗县| 元谋县| 简阳市| 金堂县| 德令哈市| 奉化市| 绥德县| 乌鲁木齐市| 小金县| 电白县| 泌阳县| 大英县| 凤冈县| 固始县| 上高县| 遂昌县| 乌什县| 宜宾县| 芦溪县| 孟州市| 大埔县| 常宁市| 东乌珠穆沁旗| 昭觉县| 建阳市| 南和县| 九寨沟县| 辽中县|