Keras model to tflite
I've got a Keras model in the hdf5 file and wanted to convert it into tflite, but I've got an issue like this
model = 'model.h5' converter = tf.lite.TFLiteConverter.from_keras_model_file(model) tflite_model = converter.convert() open("converted/model.tflite", "wb").write(tflite_model)
ValueError: Unknown loss function:custom_loss
I know that I should load my custom loss as custom_object, but I can't find a way to it with TensorFlow function. What is the solution for this?