arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.07219cs.LG
收藏

单精度与双精度的训练神经网络

Training Neural Networks in Single vs Double Precision

Institute of Computer Science, University of St.Gallen (HSG)(圣加仑大学(HSG)计算机科学研究所)

Tomas Hrycej, Bernhard Bermeitinger, Siegfried Handschuh

摘要:

对单精度浮点运算的承诺在深度学习社区中很普遍。为了评估这种承诺是否合理,计算精度(单精度和双精度的)对共轭梯度(CG)方法(二阶优化算法)和RMSprop(一阶算法)的优化性能的影响进行了研究。神经网络具有一到五个完全连接的隐藏层和高达400万个网络参数的中等或强非线性的测试已经针对均方误差(MSE)进行了优化。已经设置了训练任务,使得它们的MSE最小值已知为零。计算实验表明,单精度可以跟上(超线性收敛)与双精度,只要线搜索发现一个改进。一阶方法(如RMSprop)无法从双精度的中获益。然而,对于中度非线性任务,CG显然更优越。对于强非线性任务,这两个算法类只找到解决方案相当差的均方误差有关的输出方差。当解决方案有可能对应用目标有用时,具有双浮点精度的CG是优越的。

英文摘要:

The commitment to single-precision floating-point arithmetic is widespread in the deep learning community. To evaluate whether this commitment is justified, the influence of computing precision (single and double precision) on the optimization performance of the Conjugate Gradient (CG) method (a second-order optimization algorithm) and RMSprop (a first-order algorithm) has been investigated. Tests of neural networks with one to five fully connected hidden layers and moderate or strong nonlinearity with up to 4 million network parameters have been optimized for Mean Square Error (MSE). The training tasks have been set up so that their MSE minimum was known to be zero. Computing experiments have disclosed that single-precision can keep up (with superlinear convergence) with double-precision as long as line search finds an improvement. First-order methods such as RMSprop do not benefit from double precision. However, for moderately nonlinear tasks, CG is clearly superior. For strongly nonlinear tasks, both algorithm classes find only solutions fairly poor in terms of mean square error as related to the output variance. CG with double floating-point precision is superior whenever the solutions have the potential to be useful for the application goal.

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

↑