arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1706.02677cs.CVcs.DCcs.LG
收藏

精确的大型小批量SGD:1小时内训练ImageNet

Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour

Facebook(Facebook(脸书))

Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, Kaiming He

摘要:

深度学习因大型神经网络和大型数据集而蓬勃发展。然而,更大的网络和更大的数据集导致更长的训练时间,阻碍了研究和开发的进展。分布式同步SGD通过将SGD小批划分到一个并行工作者池上,为这个问题提供了一个潜在的解决方案。然而,为了使这个方案有效,每个工作者的工作量必须很大,这意味着SGD minibatch大小的不平凡的增长。在本文中,我们通过经验证明,在ImageNet数据集上,大的小批量会导致优化困难,但当这些问题得到解决时,经过训练的网络表现出良好的泛化能力。具体来说,我们在使用高达8192张图像的大型小批量训练时没有表现出准确性损失。为了实现这一结果,我们采用了一个超参数的线性缩放规则来调整学习率作为小批量大小的函数,并开发了一个新的预热方案,克服了早期训练中的优化挑战。通过这些简单的技术,我们基于Caffe 2的系统在一个小时内在256个GPU上训练了8192个小批量大小的ResNet-50,同时匹配小批量精度。使用商品硬件,我们的实现了约90%的扩展效率时,从8到256 GPU。我们的研究结果使得在互联网规模的数据上高效地训练视觉识别模型成为可能。

英文摘要:

Deep learning thrives with large neural networks and large datasets. However, larger networks and larger datasets result in longer training times that impede research and development progress. Distributed synchronous SGD offers a potential solution to this problem by dividing SGD minibatches over a pool of parallel workers. Yet to make this scheme efficient, the per-worker workload must be large, which implies nontrivial growth in the SGD minibatch size. In this paper, we empirically show that on the ImageNet dataset large minibatches cause optimization difficulties, but when these are addressed the trained networks exhibit good generalization. Specifically, we show no loss of accuracy when training with large minibatch sizes up to 8192 images. To achieve this result, we adopt a hyper-parameter-free linear scaling rule for adjusting learning rates as a function of minibatch size and develop a new warmup scheme that overcomes optimization challenges early in training. With these simple techniques, our Caffe2-based system trains ResNet-50 with a minibatch size of 8192 on 256 GPUs in one hour, while matching small minibatch accuracy. Using commodity hardware, our implementation achieves ~90% scaling efficiency when moving from 8 to 256 GPUs. Our findings enable training visual recognition models on internet-scale data with high efficiency.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑