4

I have a tflite model and i want to convert it into tensorflow or keras or ONNX format. Is there a way?

I can import it using tf interpreter and run it on python. However i want to convert it into one of the above formats.

import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path="conv_actions_frozen.tflite")
tensors = interpreter.get_tensor_details()
halfelf
  • 9,737
  • 13
  • 54
  • 63
Sachin A
  • 41
  • 2

1 Answers1

0

Now there is converter to convert tflite models to onnx format. Install the tflite2onnx library. All you have to do is :

import tflite2onnx

tflite_path = "path/to/the/tflitemodel"
onnx_path = "path/where/you/want/to/save/your/model" #modelname.onnx


tflite2onnx.convert(tflite_path,onnx_path)
Hitesh Kumar
  • 193
  • 3
  • 11