I am trying to convert Keras model (.h5) to freeze graph (.pb), and then convert to tflite (*.tflite). Not directly convert Keras to tflite is because the tool tflite_convert get failed (lack of bias parameters). I checked with all dense layer model, this approach works well. But now get failed when handle rnn model.
The Keras model I've built is viewed as below:
After run convertkeras.py, the generated pb file .pb doesn't contain any LSTM layer, but only with the first Embedding layer and the last dense layer, and a huge expanded networks (i guess):
Do you know why this happened? I've also checked one of the official tflite model (speech_speakerid_model_2017_11_14.tflite), it indeed contains LSTM layer, that means freeze graph or tflite should support this layer type:
The Keras backend is Tensorflow, and the model comes from Keras example: https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py
I am trying to convert Keras model (.h5) to freeze graph (.pb), and then convert to tflite (*.tflite). Not directly convert Keras to tflite is because the tool tflite_convert get failed (lack of bias parameters). I checked with all dense layer model, this approach works well. But now get failed when handle rnn model.
The Keras model I've built is viewed as below:
After run convertkeras.py, the generated pb file .pb doesn't contain any LSTM layer, but only with the first Embedding layer and the last dense layer, and a huge expanded networks (i guess):
Do you know why this happened? I've also checked one of the official tflite model (speech_speakerid_model_2017_11_14.tflite), it indeed contains LSTM layer, that means freeze graph or tflite should support this layer type: