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

tf.image.resize can't convert to FP16 model #2305

Open
nistarlwc opened this issue Feb 18, 2024 · 1 comment
Open

tf.image.resize can't convert to FP16 model #2305

nistarlwc opened this issue Feb 18, 2024 · 1 comment
Labels
bug An unexpected problem or unintended behavior

Comments

@nistarlwc
Copy link

Describe the bug

I have a model of segmentation, Bisenet-V2.
Need to convert to FP16 model, first convert a FP32 model successfully, and predict successfully too.
Then use float16_converter of onnxmltools to convert a FP16 model.
But when run the prediction, there is a error:
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from model_fp16.onnx failed:Node (Resize__846) Op (Resize) [ShapeInferenceError] Either sizes or scales must be provided, but not both of them

Is the problem about function tf.image.resize_bilinear?
How to solve it ?

Try to find some issue with same problem,
FP16 conversion yields an unusable model,
FP16 conversion yields an unusable model
support sizes for Resize op

Urgency

Urgent

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 18.04*): Windows 10
  • TensorFlow Version: tensorflow 2.3
  • Python version: python 3.8
  • ONNX version (if applicable, e.g. 1.11*): onnx 1.12.0
  • ONNXRuntime version (if applicable, e.g. 1.11*): onnxruntime-gpu 1.15.1

To Reproduce

Screenshots

Additional context

@nistarlwc nistarlwc added the bug An unexpected problem or unintended behavior label Feb 18, 2024
@fatcat-z
Copy link
Collaborator

I think the attributes of Resize op was reset during converting to a FP16 model, @xiaowuhu , do you have any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants