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
708 stars 73 forks source link

Android GPU inference falls with TRANSPOSE_CONV: Max version supported: 3. Requested version 4. #640

Closed gabrielpopa closed 6 months ago

gabrielpopa commented 6 months ago

Issue Type

Feature Request

OS

Others

onnx2tf version number

1.22.0

onnx version number

1.15.0

onnxruntime version number

1.17.1

onnxsim (onnx_simplifier) version number

0.4.33

tensorflow version number

2.16.1

Download URL for ONNX

private

Parameter Replacement JSON

no

Description

Exporting a tflite using onnx2tf works fine, but falls back on the CPU when it meets a ConvTranspose layer with the error TRANSPOSE_CONV: Max version supported: 3. Requested version 4.

It runs fine on the CPU, but obviously slower.

It would be great if one could choose the version of the operation or I'm doing something wrong.

Should I change the ONNX file to use different ConvTranspose?

Netron says: module: ai.onnx v11 it has attributes of dilations, group, kernel_shape, pads, strides.

PINTO0309 commented 6 months ago

It has nothing to do with the functionality of ONNX or onnx2tf. onnx2tf just calls the TensorFlow model converter in the middle of the process.

I don't believe there is an API implemented in TensorFlow to specify the version of the operator. Therefore, please submit an issue in the TensorFlow repository.

I doubt they would take feature requests seriously.

github-actions[bot] commented 6 months ago

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