title: In Keras, how to get 3D input and 3D output for LSTM layers
body: <p>In my original setting, I got</p>
  
  <pre><code>X1 = (1200,40,1)
  y1 = (1200,10)
  </code></pre>
  
  <p>Then, I work perfectly with my codes:</p>
  
  <pre><code>model = Sequential()
  model.add(LSTM(12, input_shape=(40, 1), return_sequences=True))
  model.add(LSTM(12, return_sequences=True))
  model.add(LSTM(6, return_sequences=False))
  model.add((Dense(10)))
  </code></pre>
  
  <p>Now, I further got another time series data same sizes as <code>X1</code> and <code>y1</code>. i.e.,</p>
  
  <pre><code>X2 = (1200,40,1)
  y2 = (1200,10)
  </code></pre>
  
  <p>Now, I stack <code>X1</code>, <code>X2</code> and <code>y1</code>, <code>y2</code> as 3D arrays:</p>
  
  <pre><code>X_stack = (1200,40,2)
  y_stack = (1200,10,2)
  </code></pre>
  
  <p>Then, I try to modify my <code>keras</code> code like:</p>
  
  <pre><code>model = Sequential()
  model.add(LSTM(12, input_shape=(40, 2), return_sequences=True))
  model.add(LSTM(12, return_sequences=True))
  model.add(LSTM(6, return_sequences=False))
  model.add((Dense((10,2))))
  </code></pre>
  
  <p>I want my code work directly with the 3D arrays <code>X_stack</code> and <code>y_stack</code> without reshaping them as 2D arrays. Would you give me a hand on how to modify the settings? Thank you.</p>