You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

convertor.py 295 B

1234567891011
  1. import tensorflow as tf
  2. # Convert the model
  3. saved_model_dir = ''
  4. converter = tf.lite.TFLiteConverter.from_saved_model(
  5. saved_model_dir) # path to the SavedModel directory
  6. tflite_model = converter.convert()
  7. # Save the model.
  8. with open('model.tflite', 'wb') as f:
  9. f.write(tflite_model)

No Description