Skip to content

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

@fatcat-z

Description

@fatcat-z

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    core runtimeissues related to core runtimestaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions