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

I want to convert to onnx #896

Open
velonica0 opened this issue May 30, 2022 · 4 comments
Open

I want to convert to onnx #896

velonica0 opened this issue May 30, 2022 · 4 comments

Comments

@velonica0
Copy link

It has error:
RuntimeError: Only tuples, lists and Variables are supported as JIT inputs/outputs. Dictionaries and strings are also accepted, but their usage is not recommended. Here, received an input of unsupported type: int
Has anyone tried converting to onnx?

@caizhaoxin
Copy link

I trained the demo code and I got the .pth file. Now I wanna transform the .pth file to onnx by "torch.onnx.export" function, but got the error below.

TypeError: forward() missing 3 required positional arguments: 'im_info', 'gt_boxes', and 'num_boxes'

Did u ever met it? Or Do u know how to fix it? Thanks a lot!

@caizhaoxin
Copy link

I didn't met ur error and I don't know why. Sorry.

@velonica0
Copy link
Author

I solve this problem. ONNX need the input and output both the tensor, so you can transfer these. However, it will be another error:
RuntimError: ONNX export failed: Could't export Python operator _ROIAlign
If you can change, can you tell how to change faster-rcnn code? Thanks a lot.

@devendraswamy
Copy link

@velonica0 Did you succeed with onnx ? If done could you please share the code here ,Thanking you in advance.

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

3 participants