1

Anyone could share an idea/blog/code snipet on how to convert a Keras Stateful LSTM into pure Tensorflow model? And then train it on batch..

Tensorflow doesn't support Keras Stateful LSTM on TPUs. Their devs refused to fix it.

I have tons of TPU time reserved and no way to use it for now. Any help is appreciated.

Model example and code to train:

model = Sequential()
model.add(LSTM(neurons, batch_input_shape=(window_size, n_steps, inputs_n), stateful=True)) 
model.add(Dense(outputs_n, activation='sigmoid'))
…
H = model.train_on_batch(X, y)

GitHub issue: https://github.com/tensorflow/tensorflow/issues/28837

Boppity Bop
  • 9,613
  • 13
  • 72
  • 151

0 Answers0