Hello,
I need to convert a model that is implemented in pytorch to tensorflow lite. I have exported the model to onnx using torch.onnx.export()
. The resulting onnx model works very well with the onnx-runtime. But when I try to use onnx-tf to convert the model to tensorflow, I get an error.
import onnx
from onnx_tf.backend import prepare
onnx_model = onnx.load("my_model.onnx")
tf_rep = prepare(onnx_model)
tf_rep.export_graph('./tf_export/my_model')
The error message is
...
raise BackendIsNotSupposedToImplementIt("{} is not implemented.".format(
BackendIsNotSupposedToImplementIt: FusedMatMul is not implemented.
So it tells me that the operation com.microsoft::FusedMatMul is not supported by onnx-tf.
What can I do from here? Can I add operators from com.microsoft to onnx-tf? Can I tell the pytorch onnx exporter not to use operations from a specific domain like com.microsoft? Or can I substitute the unsupported operation?
Any ideas are welcome