tensorflow-onnx icon indicating copy to clipboard operation
tensorflow-onnx copied to clipboard

Current implementation of RFFT or FFT only allows ComplexAbs as consumer not {'Imag', 'Real'}

Open achimmihca opened this issue 2 years ago • 0 comments

Ask a Question

I am trying to convert the SPICE model for pitch detection to onnx format.

I installed latest TensorFlow (2.12.0 at time of writing) and tf2onnx on my Windows machine (Windows 11, 64bit): python -m pip install "tensorflow==2.12" pip install -U tf2onnx My Python version is 3.10.10.

When running the conversion, I get an error message

> python -m tf2onnx.convert --opset 16 --tflite .\lite-model_spice_1.tflite --output spice.onnx
...
ValueError: make_sure failure: Current implementation of RFFT or FFT only allows ComplexAbs as consumer not {'Imag', 'Real'}
2023-04-04 09:30:26,364 - ERROR - Tensorflow op [Real: Real] is not supported
2023-04-04 09:30:26,364 - ERROR - Tensorflow op [Imag_5: Imag] is not supported
2023-04-04 09:30:26,365 - ERROR - Tensorflow op [Imag_4: Imag] is not supported
2023-04-04 09:30:26,366 - ERROR - Tensorflow op [Imag_3: Imag] is not supported
2023-04-04 09:30:26,371 - ERROR - Tensorflow op [Imag_2: Imag] is not supported
2023-04-04 09:30:26,372 - ERROR - Tensorflow op [Imag_1: Imag] is not supported
2023-04-04 09:30:26,373 - ERROR - Tensorflow op [Imag: Imag] is not supported
2023-04-04 09:30:26,417 - ERROR - Unsupported ops: Counter({'Real': 6, 'Imag': 6})
...
ValueError: make_sure failure: Current implementation of RFFT or FFT only allows ComplexAbs as consumer not {'Imag', 'Real'}

Question

What do I need to install to allow 'Imag' and 'Real'? Is it related to TensorFlow, tf2onnx, or the model?

I did not find this error message when searching.

Further information

  • Model: SPICE model
  • Model format: tflite or saved_model, both result in same error message
  • Model opset: 16 (see conversion command above, but also happens with other opset values)

achimmihca avatar Apr 04 '23 07:04 achimmihca