Evaluating the accuracy of the TFLite model
The tiny model just trained can classify the 10 classes of CIFAR-10 with an accuracy of 73%. However, what is the model's accuracy of the quantized variant generated by the TFLite converter?
In this recipe, we will quantize the model with the TFLite converter and show how to perform this accuracy evaluation on the test
dataset with the TFLite Python interpreter. After the accuracy evaluation, we will convert the TFLite model to a C-byte array.
The following Colab file (the Evaluating the accuracy of the quantized model section) contains the code referred to in this recipe:
prepare_model.ipynb
:
Getting ready
In this section, we will explain why the accuracy of the TFLite model may differ from the trained one.
As we know, the trained model needs to be converted to a more compact and lightweight representation...