Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created May 6, 2019 04:37
Show Gist options
  • Save shubham0204/f77aac314957eae28225bafa7e53d5e1 to your computer and use it in GitHub Desktop.
Save shubham0204/f77aac314957eae28225bafa7e53d5e1 to your computer and use it in GitHub Desktop.
model.save( 'model.h5' )
converter = tf.lite.TFLiteConverter.from_keras_model_file( 'model.h5' )
converter.post_training_quantize = True
tflite_model = converter.convert()
size = open( 'recog_model.tflite' , 'wb' ).write( tflite_model )
print( 'Model size > {} Megabytes'.format( size / 1024**2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment