Tflite VS tensorflow Vs tflite-micro

When I create three libs (tflite, tensorflow, tflite for micro) on Linux and use and evaluate models in that environment, will the performance decrease with tensorflow → tflite → tflite for micro? It is expected that the accuracy or tensor output will be different for each environment. Which of tflite and tflie for micro will produce results most similar to tensorflow? I thought tflite would give more similar results, but the comparison showed that micro gave more similar results, so I am asking a question.

1 Like

Hi @haemin, Generally when you convert your model to tflite there won’t be any change in the accuracy. But there will be minimal difference in accuracy when we convert tensorflow to tflite, the accuracy difference will depend upon the type of quantization you have used.

If you have quantized the model using full integer quantization there will be more difference in accuracy compared to tensorflow. If you have used dynamic quantization (weights in int, activations in float) then the accuracy difference will be less. Thank You.

Then, how is the result of reasoning the tflite model by building tflite rib in linux different from the result of reasoning by building tflite-micro rib? Is it normal if the performance is lower in the micro? Or is it different depending on the model (situation)?

Hi @haemin, Even in the micro controllers we use the same tflite file. But the micro controllers have a constraint to work on integers. so we use the integer quantization. As mentioned in this document if we use integer quantization we have small reduction in accuracy. Thank You.