Skip to content

Instantly share code, notes, and snippets.

@Rishit-dagli
Created October 16, 2020 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rishit-dagli/3cb4f479f6f2b07069a2f5f73902f3a8 to your computer and use it in GitHub Desktop.
Save Rishit-dagli/3cb4f479f6f2b07069a2f5f73902f3a8 to your computer and use it in GitHub Desktop.
Full integer quantization TFLite
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
converter.inference_input_type = tf.uint8
converter.inference_output_type = tf.uint8
tflite_model_quant = converter.convert()
tflite_model_quant_file = "model.tflite"
tflite_model_quant_file.write_bytes(tflite_model_quant)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment