This is example project showing a couple different ways of testing TensorFLow Lite models. It contains code for:
- Converting TensorFlow to TensorFlow Lite model,
- Comparing TF and TF Lite models side by side (including post-training quantization)
- Running automated tests on Android application with Espresso library.
For more details, check:
- Blog post (testing in Colab notebook): Testing TensorFlow Lite image classification model
- Blog post (testing in Android instrumented tests): Automate testing of TensorFlow Lite model implementation
- Colab notebook
- Converting TensorFLow model to TensorFLow Lite with Concrete Function: https://www.tensorflow.org/lite/r2/convert/concrete_function
- Post training quantization: https://www.tensorflow.org/lite/performance/post_training_quantization
Click below to run Colab notebook: