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

模型导出问题 #3694

Open
1 task done
Daniel-969 opened this issue Apr 9, 2024 · 2 comments
Open
1 task done

模型导出问题 #3694

Daniel-969 opened this issue Apr 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@Daniel-969
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

我修改网络后,在导出模型的时候必须指定图片大小,否则会报错形状不匹配。
找到原因是在forward的时候需要拿到输入的shape,在导出的时候如果不设置图片大小,它会默认图片大小为-1,然后就会报错。
请问这个时候,我如果要预测裁剪后的cityscapes图片(如10241024),但原始图片是20481024,我应该怎么做才行。

@Daniel-969 Daniel-969 added the question Further information is requested label Apr 9, 2024
@shiyutang
Copy link
Collaborator

你好,可以直接执行为预测图片大小,1024*1024。

@Daniel-969
Copy link
Author

使用export.py指定输入大小(如 1024512)后导出模型,这个时候用原始的cityscapes图片大小(20481024)执行infer.py函数是会报错形状不匹配的,这种情况我应该怎么做才能用原始cityscapes测试infer呢?因为我需要测量以1024*512大小的图片输入网络所需要的推理时间。

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

No branches or pull requests

2 participants