当前位置:网站首页>【量化测试】
【量化测试】
2022-08-06 20:33:00 【网络星空(luoc)】
文章目录

量化前
量化后
#Dynamic quantization 动态量化
import onnx
from onnxruntime.quantization import quantize_dynamic, QuantType
model_fp32 = 'path/to/the/model.onnx'
model_quant = 'path/to/the/model.quant.onnx'
quantized_model = quantize_dynamic(model_fp32, model_quant, weight_type=QuantType.QUInt8)
--------------------------
# QAT quantization QAT量化
import onnx
from onnxruntime.quantization import quantize_qat, QuantType
model_fp32 = 'path/to/the/model.onnx'
model_quant = 'path/to/the/model.quant.onnx'
quantized_model = quantize_qat(model_fp32, model_quant)
边栏推荐
猜你喜欢

The meaning, tools, categories and differences of version control

nuScenes数据集浅探(待完善……)

原型链中的函数和对象

非科班AI小哥火了:他没有ML学位,却拿到DeepMind的offer

互联网基石:TCP/IP 四层模型,由浅入深直击原理!

Dingxiang's first business security monthly report

Redis 的网络框架是实现了 Reactor 模型吗?

LeetCode高频题79. 单词搜索,如果 word 存在于网格中,返回 true ;否则,返回 false

Pytest learning - reading YAML files

TI AM335x继任者?AM6254性能解析
随机推荐
MogDB/openGauss 2.0.1 升级到 3.0
GPT-3组合DALL·E,60秒内搞定游戏设定和原型动画!网友看后:这游戏想玩
The optimization method to solve the slow loading of the website caused by Google AdSense
R语言使用oneway.test函数执行单因素方差分析(One-Way ANOVA)、使用aov函数执行单因素方差分析(aov函数默认组间方差相同)
TI AM335x继任者?AM6254性能解析
UNet语义分割网络
keep-alive动态移除缓存
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的方差
CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) F
游戏建模师现状如何?10个建模师,有9个吃不上饭,是真的吗?
R语言时间序列数据的平滑:使用KernSmooth包的dpill函数和locpoly函数对时间序列数据进行平滑以消除噪声、使用dpill函数筛选合适的带宽值(bandwidth)
LeetCode高频题79. 单词搜索,如果 word 存在于网格中,返回 true ;否则,返回 false
AQS同步组件-CountDownLatch解析和案例
JDY-16 蓝牙4.2模块串口测试方法
Functions and Objects in the Prototype Chain
xss-labs靶场1~7详解
Kotlin - 协程调度器 CoroutineDispatcher
从0到1构建可视化大屏-员工管理
系统学习CV-pytorch扩展-timm
【目标检测】数据增强:YOLO官方数据增强实现/imgaug的简单使用