0

as far as i known, the matrix's inverse is a common operator.

while tf.raw_ops.MatrixInverse is not supported in tflite and BatchMatrixInverse is not available in GraphDef version 1205.

How can i calculate the inverse of the matrix in tflite?

Best wishes

Progman
  • 16,827
  • 6
  • 33
  • 48
jiaocha
  • 21
  • 5
  • Hi @jiaocha, Try using tf.linalg.inv( ) to find the inverse matrix. Thank You. –  Dec 05 '22 at 11:17

1 Answers1

0

Before you convert your model to tflite model you have to enable TF ops to work in tflite by using the below code

converter.target_spec.supported_ops = [
    tf.lite.OpsSet.TFLITE_BUILTINS,  # enable TensorFlow Lite ops.
    tf.lite.OpsSet.SELECT_TF_OPS  # enable TensorFlow ops.
]

For more details please refer to this document. Thank You.