Created
May 26, 2021 17:09
This file contains hidden or 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