tf2 quantization

Quantify

Compared with the quantization of tf1, the quantization of tf2 is much more brief. In the convert2tflite.py file, examples of quantization, tflite testing, and drawing confusion matrices are provided.
Here I want to mention the quantization of tflite and the quantization of eiq. It seems that the model quantized by tflite will be twice the size of eiq, but there is basically no loss after tflite quantization, which is quite strange.
When testing the tflite model, it is recommended to use a real-shot data set, so that the result you get should be similar to the correct rate of the real state.
Because we will train many models, it will have different parameters, so a json file will be generated every time quantization, which saves the information of the model.

Guess you like

Origin blog.csdn.net/qtzbxjg/article/details/128619246
tf2