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

Issue with onnx output shape #207

Closed
jnskplr opened this issue Mar 30, 2022 · 1 comment
Closed

Issue with onnx output shape #207

jnskplr opened this issue Mar 30, 2022 · 1 comment

Comments

@jnskplr
Copy link

jnskplr commented Mar 30, 2022

Hi,

I'm on paper branch and trained yolor-p6 on custom dataset. Now I exported it to onnx model.

Shape of my onnx output layer is batch, 3, 96, 160, nc. That differs from shape of forward() function return when doing detect.py.

When I set model.model[-1].export = False in export.py, I will get the correct output layer in my onnx model, but that model does not work for any other inference engine.

Setting model.model[-1].export True or False delivers two different onnx models, why is that the case? Any suggestion of what this problem could solve or how to get the correct output layer in onnx model?

Thanks.

@jnskplr
Copy link
Author

jnskplr commented Apr 1, 2022

Followed steps described in this issue from yolov5: convert yolov5 to openvino

Getting correct output layer now and onnx model works.

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