Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ppyolo_tiny模型量化 #2905

Closed
DongChenwei2000 opened this issue May 8, 2021 · 5 comments
Closed

ppyolo_tiny模型量化 #2905

DongChenwei2000 opened this issue May 8, 2021 · 5 comments
Assignees
Labels
deploy Deployment including inference, lite and serving

Comments

@DongChenwei2000
Copy link

使用静态图的ppyolo_tiny,在ppyolo_tiny模型做量化后模型体积的确减小到1.3M左右,但是将其转为onnx后又变回原来的4M大小,是否有办法将其体积缩小呢?还是说onnx本来就是这个大小呢?

@heavengate
Copy link
Collaborator

模型原始大小是4M,通过后量化保存的的权重是量化后的int8的权重,压缩到1.3M,看情况像是你转onnx之后权重又回退到float32的权重,可以排查一下onnx的权重配置

@jiangjiajun
Copy link
Contributor

目前Paddle2ONNX还不支持转换量化的模型,如有需求量化,建议使用Paddle2ONNX转ppyolo_tiny的非量化模型,然后使用目标推理引擎的离线量化工具对转换后的ONNX模型进行量化

@DongChenwei2000
Copy link
Author

目前Paddle2ONNX还不支持转换量化的模型,如有需求量化,建议使用Paddle2ONNX转ppyolo_tiny的非量化模型,然后使用目标推理引擎的离线量化工具对转换后的ONNX模型进行量化

请问这个离线量化工具是什么? 是类似于这种方法对onnx模型量化吗#2810 (comment)
还是说其他的离线量化工具?

@jiangjiajun
Copy link
Contributor

例如TensorRT就有自己的量化工具

@paddle-bot-old
Copy link

Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
It is recommended to pull and try the latest code first.
由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy Deployment including inference, lite and serving
Projects
None yet
Development

No branches or pull requests

3 participants