首页 | 本学科首页   官方微博 | 高级检索  
     检索      

一种量化因子自适应学习量化训练算法
引用本文:聂慧,李康顺,苏洋.一种量化因子自适应学习量化训练算法[J].系统仿真学报,2022,34(7):1639-1650.
作者姓名:聂慧  李康顺  苏洋
作者单位:1.东莞城市学院 计算机与信息学院, 广东 东莞 5234302.广东科技学院 计算机学院, 广东 东莞 5230003.华南农业大学 数学与信息学院, 广东 广州 510046
基金项目:广东省教育厅重点领域专项(新一代信息技术)(2021ZDX1029);广东省自然科学基金面上项目(2020A1515010784);东莞城市学院青年教师发展基金(2021QJY003Z)
摘    要:深度神经网络因参数量过多而影响嵌入式部署,解决的办法之一是模型小型化(如模型量化,知识蒸馏等)。针对这一问题,提出了一种基于BN(batch normg lization)折叠的量化因子自适应学习的量化训练算法(简称为LSQ-BN算法)。采用单个CNN(convolutional neural)构造BN折叠以实现BN与CNN融合;在量化训练过程中,将量化因子设置成模型参数;提出了一种自适应量化因子初始化方案以解决量化因子难以初始化的问题。实验结果表明:8bit的权重和激活量化,量化模型的精度与FP32预制模型几乎一致;4bit的权重量化和8 bit的激活量化,量化模型的精度损失在3%以内。因此,LSQ-BN是一种优异的模型量化算法。

关 键 词:BN折叠  CNN卷积  自适应初始化  模型量化因子  
收稿时间:2021-03-07

A Quantization Training Algorithm of Adaptive Learning Quantization Scale Fators
Hui Nie,Kangshun Li,Yang Su.A Quantization Training Algorithm of Adaptive Learning Quantization Scale Fators[J].Journal of System Simulation,2022,34(7):1639-1650.
Authors:Hui Nie  Kangshun Li  Yang Su
Institution:1.School of Computer and Informatics, City College of Dongguan University of Technology, Dongguan 523430, China2.School of Computer Science, Guangdong University of Science and Technology, Dongguan 523000, China3.College of Mathematics and Informatics College, South China Agricultural University, Guangzhou 510046, China
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.
Keywords:BN folding  CNN convolution  adaptive initialization  model quantization scale-factor  
点击此处可从《系统仿真学报》浏览原始摘要信息
点击此处可从《系统仿真学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号