onnx / tensorflow-onnx

Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX
Apache License 2.0
2.32k stars 432 forks source link

Unsupported ops: {'TFL_TransformLandmarks', 'TFL_Landmarks2TransformMatrix', 'TFL_TransformTensorBilinear'} #2024

Open JNingWei opened 2 years ago

JNingWei commented 2 years ago

Hi author, I encountered some unsupported when converting face_landmark_with_attention.tflite to onnx:

python -m tf2onnx.convert --opset 16 --tflite  face_landmark_with_attention.tflite  --output  model.onnx

The error is as follows:

RuntimeWarning: 'tf2onnx.convert' found in sys.modules after import of package 'tf2onnx', but prior to execution of 'tf2onnx.convert'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
INFO - Using tensorflow=2.9.1, onnx=1.10.2, tf2onnx=1.12.0/4debef
INFO - Using opset <onnx, 16>
WARNING - Currently installed onnx package 1.10.2 is too low to support opset 16, please upgrade onnx package to avoid potential conversion issue.
WARNING - Error loading model into tflite interpreter: Encountered unresolved custom op: Landmarks2TransformMatrix.
See instructions: https://www.tensorflow.org/lite/guide/ops_customNode number 192 (Landmarks2TransformMatrix) failed to prepare.

ERROR - Unsupported ops: Counter({'TFL_TransformLandmarks': 5, 'TFL_Landmarks2TransformMatrix': 3, 'TFL_TransformTensorBilinear': 3})

Any suggestions? Thanks.

imjking commented 1 year ago

@JNingWei Hello, have you found a solution for this?