Created
May 26, 2021 17:09
-
-
Save qaixerabbas/ef7588e9eb996cc45025dbed8acce6de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
#load required libraries and functions such as load_model etc | |
model_path = './example.h5' #path to your model | |
tf_model = tf.keras.models.load_model( model_path ) | |
converter = tf.lite.TFLiteConverter.from_keras_model( tf_model ) | |
tf_lite_model = converter.convert() | |
open( 'facenet.tflite' , 'wb' ).write( tf_lite_model ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment