Comments (4)
哦豁,你需要注意到不同的后端要求的量化模型格式也不一样,你现在导出的这种带json的格式应该是open ppl需要的,这种格式所有量化参数都保存在json文件中,ppl可以直接执行。
请知悉:
如果你选择tensorRT作为导出平台,则我们将直接导出量化后的engine文件,tensorRT可以直接运行;
如果你选择snpe作为导出平台,量化参数将被写入caffe proto文件,snpe好像...可以直接运行;
如果你选择nxp作为导出格式,量化参数将被写入onnx,nxp可以直接运行;
如果你选择onnxruntime作为导出格式,我们将在网络中插入quant以及dequant节点,onnxruntime可以直接运行。
如果你选择onnxruntime OOS作为导出格式,我们将在网络中插入quant以及dequant节点,并且置换原有计算节点,onnxruntime可以直接运行。
如果你选择onnx作为导出格式,我们将导出一个ppq原生的格式,这个格式只是用来debug的。
如果你想最快速的看到结果,选择onnxruntime作为导出格式即可,你就可以在导出的onnx中看到量化结果。
所有导出平台被列举在ppq.api.文件中:
EXPORTERS = {
TargetPlatform.PPL_DSP_INT8: PPLDSPCaffeExporter,
TargetPlatform.PPL_DSP_TI_IN8: PPLDSPTICaffeExporter,
TargetPlatform.PPL_CUDA_INT8: PPLBackendExporter,
TargetPlatform.SNPE_INT8: SNPECaffeExporter,
TargetPlatform.NXP_INT8: NxpExporter,
TargetPlatform.ONNX: OnnxExporter,
TargetPlatform.ONNXRUNTIME: ONNXRUNTIMExporter,
TargetPlatform.CAFFE: CaffeExporter,
TargetPlatform.NATIVE: NativeExporter,
TargetPlatform.EXTENSION: ExtensionExporter,
# TargetPlatform.ORT_OOS_INT8: ONNXRUNTIMExporter,
TargetPlatform.ORT_OOS_INT8: ORTOOSExporter,
TargetPlatform.METAX_INT8_C: ONNXRUNTIMExporter,
TargetPlatform.METAX_INT8_T: ONNXRUNTIMExporter,
}
from ppq.
谢谢!请问导出平台是指TargetPlatform吗?提及的情况大概是这几行?
https://github.com/openppl-public/ppq/blob/35fb7f78b24946f6224793719603db75305e5d55/ppq/parser/__init__.py#L23-L35
from ppq.
啊对,这里面除了ONNX, NATIVE, EXTENSION都是后端实际需要的格式。
选择NATIVE会导出ppq的二进制原生格式;
选择EXTENSION没什么用,那个只是告诉你你可以重写EXTENSION类来实现自己的导出逻辑。
from ppq.
好的,非常感谢!
from ppq.
Related Issues (20)
- 请问PPQ支持一维网络模型的量化吗 HOT 1
- [视频资料]使用profiler来分析网络性能,tensorboard无法解析日志文件 HOT 2
- PPQint8CPU量化bug HOT 1
- Op Execution Error MMCVModulatedDeformConv2d
- 关于QAT中的BN? HOT 1
- 是否有计划支持高通QNN(比较新的版本)和海思芯片呢? HOT 1
- ppq使用torch_mlir导出tosa格式的mlir HOT 1
- 这个工具链已经收敛了吗?我看已经比较久没有特性更新了,后续还有新特性计划吗? HOT 1
- 能否支持权重和激活位宽不同的量化? HOT 2
- VIT类模型量化感知训练loss跑飞 HOT 1
- PPQ已经支持了不少后端推理框架(TensorRT,ncnn,mnn等),这些后端的量化规格细节都是怎么获取的呢?现在PPQ与后端量化推理可以完全对齐吗?
- PPQ在画质类任务上(如低光降噪)量化效果咋样呢?
- AttributeError: 'NoneType' object has no attribute 'copy'
- 求助 为什么量化以后模型没有减小?
- ProgramEntrance_2.py读取imagenet图片reshape报错
- RuntimeError: Op Execution Error: /Slice(Type: Slice, Num of Input: 5, Num of Output: 1)
- Quantization for tflite HOT 1
- PPQ can not process parameter variable(PPQ_Variable_108) with multiple destinations HOT 3
- PPQ量化后,不能导出engine(05_QuantizationAgain.py)
- How does PPQ perform real quantization and achieve speed up?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppq.