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

在yolo11的pt模型转换时,按照examples/yolov8.cpp中为了dynamic shape进行的调整不能成功 #5905

Open
codeliuyang opened this issue Feb 15, 2025 · 1 comment

Comments

@codeliuyang
Copy link

detail | 详细描述 | 詳細な説明

因为在yolo11n_pnnx.py中还存在这样的代码

        v_93, v_94 = torch.split(tensor=v_92, dim=1, split_size_or_sections=(128,128))
        v_95 = self.model_10_m_0_attn_qkv_conv(v_94)
        v_96 = v_95.view(1, 2, 128, 400)
        v_97, v_98, v_99 = torch.split(tensor=v_96, dim=2, split_size_or_sections=(32,32,64))
        v_100 = torch.transpose(input=v_97, dim0=-2, dim1=-1)
        v_101 = torch.matmul(input=v_100, other=v_98)
        v_102 = (v_101 * 1.767767e-01)
        v_103 = F.softmax(input=v_102, dim=-1)
        v_104 = torch.transpose(input=v_103, dim0=-2, dim1=-1)
        v_105 = torch.matmul(input=v_99, other=v_104)
        v_106 = v_105.view(1, 128, 20, 20)
        v_107 = v_99.reshape(1, 128, 20, 20)
        v_108 = self.model_10_m_0_attn_pe_conv(v_107)

不知道这里该如何处理,能否麻烦有人可以帮忙看看

@mingtianquan
Copy link

确实 pnnx yolov8n_pnnx.py.pt inputshape=[1,3,640,640] inputshape2=[1,3,320,320] 这步不会生成新的文件

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

2 participants