Closed md-rifatkhan closed 8 months ago
can you please upload the model to tflite?
I tried with this but it not working
import tensorflow as tf Define the path to the HDF5 model file file_path = r'C:\Users\user.keras\datasets\rrdn-C4-D3-G32-G032-T10-x4_epoch299.hdf5' Load the HDF5 model model = tf.keras.models.load_model(file_path) Convert the model to a TFLite model tflite_converter = tf.lite.TFLiteConverter.from_keras_model(model) tflite_model = tflite_converter.convert() Save the TFLite model with open('model.tflite', 'wb') as f: f.write(tflite_model)
import tensorflow as tf
file_path = r'C:\Users\user.keras\datasets\rrdn-C4-D3-G32-G032-T10-x4_epoch299.hdf5'
model = tf.keras.models.load_model(file_path)
tflite_converter = tf.lite.TFLiteConverter.from_keras_model(model) tflite_model = tflite_converter.convert()
with open('model.tflite', 'wb') as f: f.write(tflite_model)
can you please upload the model to tflite?
I tried with this but it not working