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 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. This system enables us to train visual recognition models on internet-scale data with high efficiency.
翻译:深度学习随着大型神经网络和大型数据集而蓬勃发展。 但是,更大的网络和更大的数据集导致培训时间延长,从而阻碍研发进步。 分布同步的 SGD 通过将 SGD 小型插管分成一组平行工人,为这一问题提供了潜在的解决办法。 然而,要使这一计划效率高,每个工人的工作量必须很大,这意味着SGD小型批量的小型技术非边际增长。 在本文中,我们的经验显示,在图像网络数据集大型小型小插头上,造成优化困难,但当这些在经过培训的网络上出现时,则表现出良好的概括化。 具体地说,在使用大型微型批量到8192张图像的培训时,我们并没有显示准确性。要达到这一结果,我们采用了线性扩展规则来调整学习率,作为小型批量的功能,并开发新的暖化计划,以克服培训初期的优化挑战。有了这些简单的技术,我们的Cafe2系统在256 GPPS上用小型小型小型小批量货精度来培训ResNet-50,同时匹配小小的精度。 使用商品硬件硬件集化的精度,使我们在890级的互联网模型上实现了智能效率。