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

How it works...

You should notice that the accuracy is much lower initially and that it catches up only after a considerable number of epochs are run. The reason for a low accuracy during initial epochs is that the number of times of weight update is much lower in this scenario when compared to the previous scenario (where the batch size was smaller).

In this scenario, when the batch size is 30,000, and the total dataset size is 60,000, when we run the model for 500 epochs, the weight updates happens at epochs * (dataset size/ batch size) = 500 * (60,000/30,000) = 1,000 times.

In the previous scenario, the weight updates happens at 500 * (60,000/32) = 937,500 times.

Hence, the lower the batch size, the more times the weights get updated and, generally, the better the accuracy is for the same number of epochs.

At the same time, you should be careful not to have too few examples in the batch size, which might result in not only having a very long training time, but also a potential overfitting scenario.

主站蜘蛛池模板: 合水县| 霍城县| 会同县| 海兴县| 天水市| 乌海市| 渑池县| 兴海县| 广丰县| 土默特左旗| 修武县| 三门县| 五原县| 衡东县| 潜江市| 库尔勒市| 伊春市| 临湘市| 乌苏市| 叶城县| 林口县| 塔城市| 从江县| 焉耆| 永济市| 威信县| 高雄市| 出国| 肇州县| 井陉县| 商洛市| 泗水县| 卢龙县| 同德县| 苏尼特左旗| 新昌县| 汶上县| 广元市| 北碚区| 清河县| 万源市|