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

使用acuitylite 转yolov5模型包含swish算子,看源码目前只支持hswish #160

Open
zjd1988 opened this issue Jan 30, 2023 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@zjd1988
Copy link

zjd1988 commented Jan 30, 2023

No description provided.

@sunshinemyson
Copy link
Contributor

@zjd1988 ,

你的问题是用AcuityLite 转 YoloV5 到 tflite格式碰到swish算子不支持吗?

Thanks

@zjd1988
Copy link
Author

zjd1988 commented Feb 10, 2023

@sunshinemyson 暂时没有用tflite-vx-delegate测试转换后的模型,在分析量化后模型的算子种类,然后对照tflite-vx-delegate来看,发现tflite-vx-delegate/op_map.cc源码没有算子,不过看到HardSwish算子,下图是AcuityLite转出的yolov5模型图,

企业微信截图_16760102779958

看tflite 的 scheme.fbs没有swish这个算子,swish应该是个自定义op,
https://github.com/zhenhuaw-me/tflite/blob/master/3rdparty/schema.fbs
企业微信截图_16760106832485

目前在想办法解析AcuityLite量化后的tflite模型,然后用python来构造网络,lenet网络验证了下问题不大,想找个yolov5验证下,所以遇到这个问题

@sunshinemyson
Copy link
Contributor

了解,你有没有原始输入模型?我请同事看看

@zjd1988
Copy link
Author

zjd1988 commented Feb 10, 2023

@sunshinemyson yolov5.zip

@sunshinemyson
Copy link
Contributor

收到

@zjd1988
Copy link
Author

zjd1988 commented Feb 12, 2023

@sunshinemyson 你好,还有个疑问,tf-lite的cpu推理结果可以跟tflite-vx-delegate完全对应起来吗?
我测试了lenet是一样的,不知道其他模型是不是可以完全一致?

@sunshinemyson
Copy link
Contributor

@zjd1988 , 我们和CPU之间会有一点精度差异,例如asymmU8的convolution我们会跟CPU有一个量化精度的差异。
但是对网络整体的精度没有影响。

@sunshinemyson
Copy link
Contributor

@zjd1988
模型转换的问题,我们下一版(Q1 release)AcuityLite会修正,会把swish拆分成tflite支持的算子。

@sunshinemyson sunshinemyson added this to the 23Q1 milestone Feb 27, 2023
@sunshinemyson sunshinemyson self-assigned this Feb 27, 2023
@sunshinemyson sunshinemyson added the bug Something isn't working label Feb 27, 2023
@zjd1988
Copy link
Author

zjd1988 commented Feb 27, 2023

@sunshinemyson 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants