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

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.

主站蜘蛛池模板: 南通市| 永寿县| 贵阳市| 南京市| 廊坊市| 福鼎市| 上高县| 太原市| 岐山县| 抚顺市| 长汀县| 金华市| 屏南县| 黄冈市| 阿尔山市| 彭水| 濮阳县| 奉贤区| 阳山县| 冀州市| 大丰市| 当阳市| 黔南| 湟中县| 东丰县| 潮安县| 江北区| 远安县| 洞头县| 普陀区| 天门市| 富顺县| 定陶县| 仪征市| 乌兰察布市| 新余市| 龙游县| 开江县| 南阳市| 彭州市| 台东市|