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

Resize op can't work well under Cubic mode with ORT 1.12. #12302

Open
fatcat-z opened this issue Jul 25, 2022 · 2 comments
Open

Resize op can't work well under Cubic mode with ORT 1.12. #12302

fatcat-z opened this issue Jul 25, 2022 · 2 comments
Labels
core runtime issues related to core runtime

Comments

@fatcat-z
Copy link

Describe the bug
Inferencing the attached ONNX file will throw an error:

RUNTIME_EXCEPTION : Non-zero status code returned while running Resize node. Name:'Resize__14' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/upsamplebase.h:311 void onnxruntime::UpsampleBase::ScalesValidation(const std::vector&, onnxruntime::UpsampleMode) const scales.size() == 2 || (scales.size() == 4 && scales[0] == 1 && scales[1] == 1) was false. 'Cubic' mode only support 2-D inputs ('Bicubic') or 4-D inputs with the corresponding outermost 2 scale values being 1 in the Resize operator

This error only happens with ORT 1.12. There is no issue with ORT 1.11.

Urgency
Normal.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04.4 LTS
  • ONNX Runtime installed from (source or binary): pip install onnxruntime
  • ONNX Runtime version: 1.12
  • Python version: python 3.8.5

To Reproduce
The attached zip file contains an ONNX file which was generated by one tf2onnx test. It could not be inferenced successfully by ORT 1.12 while it works with ORT 1.11.

Expected behavior
It should be inferenced successfully, just like previous ORT version.
test_resize_bicubic.zip

@hariharans29 hariharans29 added core runtime issues related to core runtime component:operator labels Jul 25, 2022
@hariharans29
Copy link
Member

Hi @yihonglyu: Could this regression be due to the NHWC Resize optimization changes ?

@fatcat-z
Copy link
Author

Hi @yihonglyu @hariharans29 , any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core runtime issues related to core runtime
Projects
None yet
Development

No branches or pull requests

3 participants