Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I test a .tflite model to prove that it behaves as the original model using the same Test Data?

I have generated a .tflite model based on a trained model, I would like to test that the tfilte model gives the same results as the original model.

Giving both the same test data and obtaining the same result.

like image 833
Jorge Jiménez Avatar asked Jun 08 '18 16:06

Jorge Jiménez


People also ask

How do you evaluate a Tflite model?

You may use TensorFlow Lite Python interpreter to test your tflite model. It allows you to feed input data in python shell and read the output directly like you are just using a normal tensorflow model.

How do I read a Tflite file?

First you'll need to compile the schema with flatbuffer. The output will be a folder called tflite . Then you can load the model and get the tensor you want.


1 Answers

You may use TensorFlow Lite Python interpreter to test your tflite model.

It allows you to feed input data in python shell and read the output directly like you are just using a normal tensorflow model.

I have answered this question here.

And you can read this TensorFlow lite official guide for detailed information.

You can also use Netron to visualize your model. It allows you to load your .tflite file directly and inspect your model architecture and model weights.

like image 119
Jing Zhao Avatar answered Sep 29 '22 05:09

Jing Zhao