首页> 外国专利> Method and apparatus for learning low-precision neural network that combines weight quantization and activation quantization

Method and apparatus for learning low-precision neural network that combines weight quantization and activation quantization

机译:用于学习结合权重量化和激活量化的低精度神经网络的方法和装置

摘要

A method is provided. The method includes selecting a neural network model, wherein the neural network model includes a plurality of layers, and wherein each of the plurality of layers includes weights and activations; modifying the neural network model by inserting a plurality of quantization layers within the neural network model; associating a cost function with the modified neural network model, wherein the cost function includes a first coefficient corresponding to a first regularization term, and wherein an initial value of the first coefficient is pre-defined; and training the modified neural network model to generate quantized weights for a layer by increasing the first coefficient until all weights are quantized and the first coefficient satisfies a pre-defined threshold, further including optimizing a weight scaling factor for the quantized weights and an activation scaling factor for quantized activations, and wherein the quantized weights are quantized using the optimized weight scaling factor.
机译:提供了一种方法。所述方法包括选择神经网络模型,其中所述神经网络模型包括多个层,并且其中所述多个层中的每一层包括权重和激活;通过在所述神经网络模型内插入多个量化层来修改所述神经网络模型;将代价函数与修改后的神经网络模型相关联,其中代价函数包括对应于第一正则化项的第一系数,并且其中第一系数的初始值是预定义的;以及通过增加第一系数来训练修改后的神经网络模型以生成层的量化权重,直到所有权重被量化且第一系数满足预定义阈值,还包括优化量化权重的权重比例因子和量化激活的激活比例因子,以及其中,使用优化的权重比例因子对量化权重进行量化。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号