0

I have trouble transforming my model into a one that can be deployed on android app via android-studio. My model is construed as follows:

model = Sequential()
model.add(LSTM(70, activation='relu', input_shape=(n_steps, n_features)))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mse')

Then saved by .save function:

model.save("my.h5")

How can I open this model on android app? I have seen that tflite has problems with LSTM and my attempts to load it with dl4j failed.

Sirko
  • 11
  • 1

1 Answers1

0

Use the Tfite converter from tensorflow contrib(lite.TFLiteConverter.from_keras_model_file( 'model.h5')) to convert HDF5 to Tflite model.