You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a usecase that ingests ONNX models, and needs to convert to PyTorch then export a traced graph (via torch.export.export()).
After converting ONNX to torch (via onnx2torch.convert()), I'm running into issues tracing the graph, due to dynamic flow control in the converted torch model.
Is there any plan for onnx2torch to support this type of usecase? Or are there any recommendations for how to workaround the dynamic flow control in the converted torch model?
An example of a problematic op is reshape - the converted torch model has logic that is conditional on the input shape parameter, to replicate ONNX's special handling of shape dimensions that have value of 0 (meaning use input shape for that dim).
Hi, I have a usecase that ingests ONNX models, and needs to convert to PyTorch then export a traced graph (via
torch.export.export()
).After converting ONNX to torch (via
onnx2torch.convert()
), I'm running into issues tracing the graph, due to dynamic flow control in the converted torch model.Is there any plan for
onnx2torch
to support this type of usecase? Or are there any recommendations for how to workaround the dynamic flow control in the converted torch model?An example of a problematic op is reshape - the converted torch model has logic that is conditional on the input shape parameter, to replicate ONNX's special handling of shape dimensions that have value of 0 (meaning use input shape for that dim).
Here's code to reproduce that issue:
This raises the following error (snippet - actual trace is very long):
Any insights would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: