title: Multiple Lstm after and before fully connected
body: <p>I have written an architecture in Keras which works fine, but I want to implement the same architecture in tensorflow. I am writing the architecture in tensorflow but I am not able to create multiple layers of LSTM.</p>
  
  <p>Here is the keras code:</p>
  
  <pre><code>input_data1 = Input(inshape, dtype='float32', name='input1')
  encoder1 = TimeDistributed(Dense(128, activation='relu', name='encoder1'), name='encoder1_TD')(input_data1)
  
  lstm1 = LSTM(256, return_sequences=True, name='lstm1')(encoder1)
  lstm2 = LSTM(256, return_sequences=True, name='lstm2')(lstm1)
  
  intermediate_data = TimeDistributed(Dense(128, activation='linear', name='decoder1'), name='decoder_TD1')(lstm2)
  output_data = TimeDistributed(Dense(12, activation='linear', name='decoder2'), name='decoder_TD2')(intermediate_data)
  
  model = Model(input_data, output_data)
  print(model.summary())
  return model
  </code></pre>
  
  <p>Can anyone please help me out with the tensorflow architecture of this? I am not able to understand the usage of MultiRNNCell. It is giving me an error whenever I use 2 or more layers of LSTM.</p>
  
  <pre><code>input shape = (batch_size, timesteps, 4)
  
  output shape = (batch_size, timesteps, 8) 
  </code></pre>