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

pnnx转换yolov9模型后运行失败 #5356

Open
deepage opened this issue Mar 1, 2024 · 0 comments
Open

pnnx转换yolov9模型后运行失败 #5356

deepage opened this issue Mar 1, 2024 · 0 comments

Comments

@deepage
Copy link
Contributor

deepage commented Mar 1, 2024

error log | 日志或报错信息 | ログ

model | 模型 | モデル

  1. 可以直接由yolov9官方release模型导出

how to reproduce | 复现步骤 | 再現方法

1.使用yolov9仓库中的export.py导出yolov9-e.pt
2.pip install pnnx ncnn
3.pnnx yolov9-e.torchscript inputshape=[1,3,640,640](暂时只验证固定输入)
4.运行yolov9_e_pnnx.py,会得到如下错误:
v_238 = torch.stack((v_213, v_237, v_236, v_235, v_234, v_233), dim=0) TypeError: expected Tensor as element 0 in argument 0, but got tuple

经过调试,发现v_213是一个tuple,然后导致了这个问题,如果把上述出错代码做如下修改:
v_238 = torch.stack((*v_213, v_237, v_236, v_235, v_234, v_233), dim=0)
pnnx模型和torchscript模型能够得到一致结果。

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