3

神经网络INT8定点化的几点准则

 2 years ago
source link: https://davidchan0519.github.io/2019/07/11/neural-network-fixpoint-tips/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

神经网络INT8定点化的几点准则

Posted on

2019-07-11

| Views: 137

采用int8方式量化模型,在不明显损失精度的前提下,可带来数倍性能的提升,该方式非常适合于移动侧的模型部署。

weights的量化

对于weights的int8量化就使用的是不饱和的方式;

( -|max| 和 |max| FP32 value 映射为 -127 和 127 ,中间值按照线性关系进行映射。)

输入数据的量化

对输入的int8量化使用的是饱和的量化方式。

(阈值 |T| ,将 ±|T| 映射为±127,这里 |T|<|max|。)

每一层的tensor 的 |T| 值都是不一样的。

什么是校准(Calibration)

确定每一层的 |T|值的过程称为 校准

您的鼓励是我持之以恒的动力
0 comments

Be the first person to leave a comment!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK