Skip to content

Instantly share code, notes, and snippets.

@maifeeulasad
Created April 21, 2021 11:30
Show Gist options
  • Save maifeeulasad/d7e67b50e378584b9f3a9761eaa93da6 to your computer and use it in GitHub Desktop.
Save maifeeulasad/d7e67b50e378584b9f3a9761eaa93da6 to your computer and use it in GitHub Desktop.
Tensorflow Lite | Android | Keras | model converter
import tensorflow as tf
model = tf.keras.models.load_model('name_gender.h5')
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
open("converted_model.tflite", "wb").write(tflite_model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment