当前位置:网站首页>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
边栏推荐
- I-BERT
- Problems encountered in connecting the database of the project and their solutions
- MySQL uninstallation and installation methods
- LeetCode:26. 删除有序数组中的重复项
- TP-LINK enterprise router PPTP configuration
- LeetCode:剑指 Offer 42. 连续子数组的最大和
- 【嵌入式】Cortex M4F DSP库
- @Jsonbackreference and @jsonmanagedreference (solve infinite recursion caused by bidirectional references in objects)
- 如何有效地进行自动化测试?
- Leetcode: Jianzhi offer 04 Search in two-dimensional array
猜你喜欢

Delay initialization and sealing classes

LeetCode:498. 对角线遍历

可变长参数

vb.net 随窗口改变,缩放控件大小以及保持相对位置

LeetCode:236. 二叉树的最近公共祖先

Compétences en mémoire des graphiques UML

Mise en œuvre de la quantification post - formation du bminf
![[sword finger offer] serialized binary tree](/img/e2/25c9322da3acda06c4517b0c50f81e.png)
[sword finger offer] serialized binary tree

ROS compilation calls the third-party dynamic library (xxx.so)

LeetCode:236. The nearest common ancestor of binary tree
随机推荐
POI add write excel file
Simple use of promise in uniapp
Intel Distiller工具包-量化实现1
Unsupported operation exception
Navicat premium create MySQL create stored procedure
Notes 01
[OC]-<UI入门>--常用控件-提示对话框 And 等待提示器(圈)
BMINF的後訓練量化實現
ESP8266-RTOS物联网开发
MongoDB 的安装和基本操作
ant-design的走马灯(Carousel)组件在TS(typescript)环境中调用prev以及next方法
UML圖記憶技巧
MySQL uninstallation and installation methods
LeetCode:673. Number of longest increasing subsequences
注意力机制的一种卷积替代方式
I-BERT
Problems in loading and saving pytorch trained models
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
数字人主播618手语带货,便捷2780万名听障人士
Tcp/ip protocol