当前位置:网站首页>BN folding and its quantification
BN folding and its quantification
2022-07-06 08:56:00 【cyz0202】
This paper introduces the process of quantification BN Fold ;
The following pictures are quoted from Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
BN Fold
First introduced BN Fold ;BN Folding comes from BN The implementation difference between the training phase and the inference phase of the module ;
As shown in the figure below : With conv+BN For example , chart 1 For the training stage BN, chart 2 For the inferential stage BN


It can be proved that such folding is reasonable , Pay attention to the picture 2 Medium w It refers to the convolution kernel ;

In quantification BN Fold
For quantification , Especially quantitative perception ( Pseudo quantization ), We need to keep the pseudo quantization in the training stage and the above figure 2 The quantitative implementation of the inference phase of is consistent , Therefore, for the training stage CONV+BN Fold in two steps , Here's the picture 3:

chart 3 Our design idea comes from figure 2, The basic idea is to seek
Of EMA( In the picture moment And the steps before and after ) After taking it off, you should match the picture 2 Agreement ;
According to the figure 3 Shown BN Fold , You can do post training quantification or pseudo quantification of the folding in the training stage , Here's the picture 4

Code implementation
The following code block is from github distiller, There is no complete context implementation , Interested readers can read step by step

summary
- The above is a brief introduction to BN Folding and its quantification , The thought is quite ingenious , Interested readers can further read in depth according to the literature mentioned in the article , thank you
- Please correct any misunderstandings
边栏推荐
- [NVIDIA development board] FAQ (updated from time to time)
- What is an R-value reference and what is the difference between it and an l-value?
- TP-LINK 企业路由器 PPTP 配置
- Leetcode: Jianzhi offer 03 Duplicate numbers in array
- LeetCode:剑指 Offer 04. 二维数组中的查找
- Revit 二次开发 HOF 方式调用transaction
- LeetCode:673. 最长递增子序列的个数
- LeetCode:26. 删除有序数组中的重复项
- LeetCode:剑指 Offer 42. 连续子数组的最大和
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
猜你喜欢

Navicat premium create MySQL create stored procedure
![[MySQL] multi table query](/img/eb/9d54df9a5c6aef44e35c7a63b286a6.jpg)
[MySQL] multi table query

UML图记忆技巧

MYSQL卸载方法与安装方法

CUDA implementation of self defined convolution attention operator

Warning in install. packages : package ‘RGtk2’ is not available for this version of R

Cesium draw points, lines, and faces
![[OC-Foundation框架]---【集合数组】](/img/b5/5e49ab9d026c60816f90f0c47b2ad8.png)
[OC-Foundation框架]---【集合数组】

After PCD is converted to ply, it cannot be opened in meshlab, prompting error details: ignored EOF

Esp8266-rtos IOT development
随机推荐
Computer cleaning, deleted system files
Computer graduation design PHP Zhiduo online learning platform
Super efficient! The secret of swagger Yapi
Show slave status \ read in G_ Master_ Log_ POS and relay_ Log_ The (size) relationship of POS
LeetCode:836. 矩形重叠
Leetcode刷题题解2.1.1
UML圖記憶技巧
甘肃旅游产品预订增四倍:“绿马”走红,甘肃博物馆周边民宿一房难求
After reading the programmer's story, I can't help covering my chest...
LeetCode:剑指 Offer 42. 连续子数组的最大和
[embedded] cortex m4f DSP Library
vb.net 随窗口改变,缩放控件大小以及保持相对位置
ant-design的走马灯(Carousel)组件在TS(typescript)环境中调用prev以及next方法
LeetCode:387. 字符串中的第一个唯一字符
BMINF的後訓練量化實現
Light of domestic games destroyed by cracking
Leetcode: Jianzhi offer 04 Search in two-dimensional array
Generator parameters incoming parameters
LeetCode:236. 二叉树的最近公共祖先
[MySQL] multi table query