Description of TF Lite’s Toco converter args for quantization aware training
You should never need to manually set the quantization stats. Have you tried the post-training-quantization tutorials? https://www.tensorflow.org/lite/performance/post_training_integer_quant Basically they set the quantization options: converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.inference_input_type = tf.uint8 converter.inference_output_type = tf.uint8 Then they pass a “representative dataset” to the converter, so that the converter can run the model a few batches to gather the … Read more