3

model_int8_convert

 2 years ago
source link: https://davidchan0519.github.io/2019/07/25/model-int8-convert/
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

model_int8_convert

Posted on

2019-07-25

|

Edited on 2019-07-31

| Views: 24

遵循的几点准则:

对于weights的int8量化使用的是不饱和的方式;( -|max| 和 |max| FP32 value 映射为 -127 和 127 ,中间值按照线性关系进行映射。)

对输入数据的int8量化使用的是饱和的量化方式。 (即确定阈值 |T| ,将 ±|T| 映射为±127,这里 |T|<|max|。)

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

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

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

Be the first person to leave a comment!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK