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

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.

主站蜘蛛池模板: 资溪县| 夏津县| 大同县| 乐清市| 库尔勒市| 镇平县| 哈尔滨市| 华容县| 平乡县| 焦作市| 临洮县| 恩施市| 安新县| 黄梅县| 甘孜| 惠州市| 吉木乃县| 三门县| 定陶县| 行唐县| 汉阴县| 寿阳县| 乌什县| 会泽县| 竹北市| 大新县| 庄浪县| 榆社县| 永寿县| 渑池县| 常山县| 尚义县| 扶绥县| 安阳市| 宁晋县| 大安市| 奎屯市| 百色市| 敦化市| 博客| 昌邑市|