PINTO0309 / onnx2tf

Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf). I don't need a Star, but give me a pull request.
MIT License
662 stars 65 forks source link

Conversion error for Resize layer when using flag "-nuo" #641

Closed amitk-OE closed 3 months ago

amitk-OE commented 3 months ago

Issue Type

Others

OS

Linux

onnx2tf version number

1.17.5

onnx version number

1.14.0

onnxruntime version number

1.15.1

onnxsim (onnx_simplifier) version number

0.4.33

tensorflow version number

2.14.0-rc1

Download URL for ONNX

toy_with_constant_and_resize.onnx.zip

Parameter Replacement JSON

{}

Description

Thank you very much for your contribution!

Continuing issue #627, I failed to convert the attached toy model that includes a resize layer.

When I try to run "onnx2tf -i toy_with_constant_and_resize.onnx -osd -nuo" I get the following error - TypeError: Could not build a TypeSpec for KerasTensor(type_spec=TensorSpec(shape=(1, None, None, 64), dtype=tf.float32, name=None), name='tf.compat.v1.image.resize_nearest_neighbor/ResizeNearestNeighbor:0', description="created by layer 'tf.compat.v1.image.resize_nearest_neighbor'") of unsupported type <class 'keras.src.engine.keras_tensor.KerasTensor'>.

The reason I want to use the flag -nuo is your comment in https://github.com/PINTO0309/onnx2tf/pull/628/files, for preserving constant outputs.

PINTO0309 commented 3 months ago

Please examine the hundreds of commit logs yourself. I am not inclined to give advice on work that is outside of the main flow.

github-actions[bot] commented 3 months ago

If there is no activity within the next two days, this issue will be closed automatically.