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

ONNX export failure: Input, output and indices must be on the current device #2428

Closed
buimanhlinh96 opened this issue Mar 11, 2021 · 3 comments
Labels
question Further information is requested Stale

Comments

@buimanhlinh96
Copy link

buimanhlinh96 commented Mar 11, 2021

❔Question

Hi @glenn-jocher ,
I am trying export model from pytorch to onnx. I set --grid argument to ignore Detect layer.
But I met a isssue :ONNX export failure: Input, output and indices must be on the current device
How can I solve this problem? Thanks
Screenshot from 2021-03-11 13-48-51

@buimanhlinh96 buimanhlinh96 added the question Further information is requested label Mar 11, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 11, 2021

@buimanhlinh96 yes I see this error as well when I reproduce your command. --device is a new argument, it seems it's not been properly tested.

But setting --grid does not achieve what you say you want, it includes the Detect() layer grid reconstructions and concatenation ops.

parser.add_argument('--grid', action='store_true', help='export Detect() layer grid')

@glenn-jocher
Copy link
Member

@buimanhlinh96 this behavior is actually documented here:
#2297 (comment)

Workaround is to use either --grid or --device but not both.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

2 participants