参考资料:
- 参考1: Accurate, Large Minibatch SGD: training imagenet in 1 hour
- 参考2: Imagenet training in minutes
- 参考3: Don't decay the learning rate, increase the batch size
- 参考4: Bag of tricks for Image Classification with Convolutional Neural Networks
- 参考5: MegDet: A Large Mini-Batch Object Detector
- 参考6: Width of Minima Reached by Stochastic Gradient Descent is Influenced by Learning Rate to Batch Size Ratio
- 参考7: One weird trick for parallelizing convolutional neural networks
使用大batch有哪些优势?(即小batch的劣势)
- 训练速度快, 提高并行度
- 针对检测任务, 大batch正负样本更均衡
- 可以有效更新BN层参数(网络使用BN的情况下)
- 精度更高(后续会进一步解释)
使用大batch有哪些劣势?
- 存在拟合问题, batch size越大, 拟合程度更低 -> 精度会低(一个可能原因是大batch训练, 不加任何trick, 会难以收敛, 只能调低learning rate, 但是降低learning rate后, 会导致精度变低)
- 存在优化问题
- 如何调整学习率?
- 多卡BN如何同步?
如何解决大batch训练带来的问题?
参考4提