我正在尝试将此 TensorFlow 模型 转换为 onnx。但是我收到一条错误消息:
> python -m tf2onnx.convert --saved-model .\spice --output model.onnx --opset 11 --verbose
...
2023-04-08 18:33:10,811 - ERROR - tf2onnx.tfonnx: Tensorflow op [Real: Real] is not supported
2023-04-08 18:33:10,812 - ERROR - tf2onnx.tfonnx: Tensorflow op [Imag: Imag] is not supported
2023-04-08 18:33:10,879 - ERROR - tf2onnx.tfonnx: Unsupported ops: Counter({'Real': 6, 'Imag': 6})
...
ValueError: make_sure failure: Current implementation of RFFT or FFT only allows ComplexAbs as consumer not {'Real', 'Imag'}
TensorFlow Light (tflight) 模型也是如此:
> 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'}
我在 Windows 11、Python 3.10.10、TensorFlow 2.12 上
这是我第一次尝试使用 TensorFlow / ONNX,所以我不确定错误来自哪里。
问题