Journal of System Simulation ›› 2022, Vol. 34 ›› Issue (7): 1639-1650.doi: 10.16182/j.issn1004731x.joss.21-0175

• VV&A Technology • Previous Articles     Next Articles

A Quantization Training Algorithm of Adaptive Learning Quantization Scale Fators

Hui Nie1,2(), Kangshun Li1,2,3(), Yang Su1   

  1. 1.School of Computer and Informatics, City College of Dongguan University of Technology, Dongguan 523430, China
    2.School of Computer Science, Guangdong University of Science and Technology, Dongguan 523000, China
    3.College of Mathematics and Informatics College, South China Agricultural University, Guangzhou 510046, China
  • Received:2021-03-07 Revised:2021-06-09 Online:2022-07-30 Published:2022-07-20
  • Contact: Kangshun Li E-mail:928753616@qq.com;likangshun@sina.com

Abstract:

Deep neural network model is difficult to effectively deploy in embedded terminals due to its excessive number of components, andone of the solutions is model miniaturization (such as model quantization, knowledge distillation, etc.). To address this problem, a quantization training algorithm (referred to as LSQ-BN algorithm) based on adaptive learning of quantizationscale factors with BN folding is proposed.A single CNN (convolutional neural) is usedtoconstruct BN folding and achieve BN and CNN fusion. During the process of quantitative training,the quantization scale factors are set as model parameters. An adaptive quantizationscale factor initialization scheme is proposed to solve the problem of difficult initialization of quantizationscale factors.The experimental results show that the precision of the quantized model is almost the same as that of the FP32 prefabricated model when the weight and activation are both 8bit quantization. When the weight is 4 bit quantization and the activation is 8bit quantization, the precision loss of the quantization model is within 3%. Therefore, LSQ-BN proposed in this paper is an excellent model quantization algorithm.

Key words: BN folding, CNN convolution, adaptive initialization, model quantization scale-factor

CLC Number: