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

Multiple inputs support? #33

Closed
lawrencekiba opened this issue Aug 1, 2019 · 3 comments
Closed

Multiple inputs support? #33

lawrencekiba opened this issue Aug 1, 2019 · 3 comments

Comments

@lawrencekiba
Copy link

lawrencekiba commented Aug 1, 2019

This is more of a question rather than an issue, but does torch2trt support multiple inputs as in a list/dict of tensors?

I've been eyeing torch2trt as an alternative to torch.onnx.export because the latter needs conversion to onnx & also only accepts one dummy_input.

@jaybdub
Copy link
Contributor

jaybdub commented Aug 1, 2019

Hi lawrencekiba,

Thanks for reaching out.

Currently multiple inputs are accepted as a list. For example,

model_trt = torch2trt(model, [input_0, input_1, input_2])

Should work. If you have something in a dict format, you could consider creating a wrapper PyTorch module that converts from a dict to list, this would likely work as well.

Please let me know if you have any questions.

Best,
John

@lawrencekiba
Copy link
Author

Ah, that sounds great. For now, I'm good. Will close this one first & proceed to try it out.

Thank you!

@chasegh
Copy link

chasegh commented Dec 24, 2020

Does torch2trt support for dict input now?

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