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

The ONNX graph converted from tf.image.crop_and_resize() function will cause a different result by ORT nightly build. #10710

Closed
fatcat-z opened this issue Mar 1, 2022 · 5 comments
Assignees

Comments

@fatcat-z
Copy link

fatcat-z commented Mar 1, 2022

Describe the bug
Install ORT nightly job. Try to execute the example script provided in this issue which is trying to inference an ONNX file generated by converting tf.image.crop_and_resize() op to ONNX via tf2onnx. The result of ORT is different than tensorflow.

Urgency
This is breaking tf2onnx CI pipeline so please fix it soon.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
  • ONNX Runtime installed from (source or binary): pip install --index-url https://test.pypi.org/simple/ ort-nightly
  • ONNX Runtime version: ort-nightly 1.11.0.dev20220228001
  • Python version: Python 3.7
  • Tensorflow version: 1.13.1

To Reproduce

  1. Download the attached zip file crop_and_resize_failure.zip.
  2. Unzip it and execute the command "python crop_resize_issue.py" under this folder.

Expected behavior
It should display Pass without any exceptions.

@HectorSVC HectorSVC added the converter related to ONNX converters label Mar 2, 2022
@fatcat-z
Copy link
Author

fatcat-z commented Mar 3, 2022

@HectorSVC ,

Actually, this issue itself has no relationship with convertor. The example code in attachment is for tf 1.x version, so the Tensorflow version is 1.13.1.

This issue actually shows that for the same ONNX file, different ORT version will cause different results. Please re-consider the tag and issue.

Thanks.

@garymm garymm added release:1.11 and removed converter related to ONNX converters labels Mar 3, 2022
@pranavsharma
Copy link
Contributor

  • can you attach the onnx model?
  • what vers of ORT gave different results?
  • how much was the difference?

@yufenglee
Copy link
Member

It should be caused by #10554. Here is the fix #10824 in review.

@RandySheriffH
Copy link
Contributor

RandySheriffH commented Mar 17, 2022

@yufenglee: I have build the fix and tried it out with the script it seems the diffs are still there.
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=198775&view=results
image

@RandySheriffH
Copy link
Contributor

@fatcat-z : now with #10917 the diffs are gone.

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

7 participants