Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created May 1, 2019 03:25
Show Gist options
  • Save shubham0204/e41150ba985d99b40403cfc18d39a759 to your computer and use it in GitHub Desktop.
Save shubham0204/e41150ba985d99b40403cfc18d39a759 to your computer and use it in GitHub Desktop.
import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_keras_model_file( 'models/model.h5' )
converter.post_training_quantize = True
tflite_buffer = converter.convert()
open( 'android/model.tflite' , 'wb' ).write( tflite_buffer )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment