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

设置 TG_DEBUG_DATA 会影响网络输出 #1437

Open
qhw42 opened this issue Dec 12, 2023 · 0 comments
Open

设置 TG_DEBUG_DATA 会影响网络输出 #1437

qhw42 opened this issue Dec 12, 2023 · 0 comments

Comments

@qhw42
Copy link

qhw42 commented Dec 12, 2023

我用pytorch训练了一个网络,使用第三方量化工具导出了onnx模型和量化表(采用非对称、per-layer uint8量化)。然后使用tengine官方的conv-tool和 quant_tool_uint8 工具导出了量化后的tmfile。
当我将模型部署到nxp的板子运行时,出现了奇怪的现象:如果我设置了TG_DEBUG_DATA 环境变量(export TG_DEBUG_DATA=1),网络能输出正确的结果(能检测到物体并正确输出其位置),如果我unset这个环境变量,则网络输出的结果就不一样了(无法检测到物体)。
如果我在pc上使用pytengine运行量化模型,则无论是否添加 TG_DEBUG_DATA 环境变量,网络都能输出正确的结果。

tengine的编译参考的是官方的 tim-vx编译指南:https://github.com/OAID/Tengine/blob/tengine-lite/doc/docs_zh/source_compile/compile_timvx.md#27-%E7%BC%96%E8%AF%91-nxp-imx-8m-plus-linux-%E5%B9%B3%E5%8F%B0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant