-
Notifications
You must be signed in to change notification settings - Fork 446
Change Loop op with maximum iterations input M equals to empty string #1971
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
Conversation
Signed-off-by: Deyu Huang <[email protected]>
no need to add new unit tests cause there are a lots of existing tests can cover it. |
Signed-off-by: Deyu Huang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@hwangdeyu I might be wrong but having an empty string for the loop M input make the symbolic shape inference of ONNX runtime failed here. Since M parameter is marked as optional in the official ONNX documentation, it might be fixed on onnxruntime side? |
Yeah,
|
Running the following command:
work using a model converted with tf2onnx==1.11.1 but failed with the same model converted with tf2onnx==1.12.0 Here is the shape inference error:
Here is the model in ONNX format If it is preferable, I'll open an issue on ONNXRuntime repo. |
It looks ok for me that |
while_loop
maximum iterations-1
means infinity in tf, but in tf2onnx it's set to max_int to get the same behavior so far.Refer to Loop spec input M, pass empty string to skip should be better.
fixes #1969
Signed-off-by: Deyu Huang [email protected]