首页> 外国专利> 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 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号