title: Cannot stack LSTM with MultiRNNCell and dynamic_rnn
body: <p>I am trying to build a multivariate time series prediction model. I followed the following tutorial for temperature prediction. <a href="http://nbviewer.jupyter.org/github/addfor/tutorials/blob/master/machine_learning/ml16v04_forecasting_with_LSTM.ipynb" rel="noreferrer">http://nbviewer.jupyter.org/github/addfor/tutorials/blob/master/machine_learning/ml16v04_forecasting_with_LSTM.ipynb</a>   </p>
  
  <p>I want to extend his model to multilayer LSTM model by using following code:</p>
  
  <pre><code>cell = tf.contrib.rnn.LSTMCell(hidden, state_is_tuple=True)  
  cell = tf.contrib.rnn.MultiRNNCell([cell] * num_layers,state_is_tuple=True)  
  output, _ = tf.nn.dynamic_rnn(cell=cell, inputs=features, dtype=tf.float32)
  </code></pre>
  
  <p>but I have an error saying: </p>
  
  <blockquote>
    <p>ValueError: Dimensions must be equal, but are 256 and 142 for
    'rnn/while/rnn/multi_rnn_cell/cell_0/cell_0/lstm_cell/MatMul_1' (op:
    'MatMul') with input shapes: [?,256], [142,512].</p>
  </blockquote>
  
  <p>When I tried this:</p>
  
  <pre><code>cell = []
  for i in range(num_layers):
      cell.append(tf.contrib.rnn.LSTMCell(hidden, state_is_tuple=True))
  cell = tf.contrib.rnn.MultiRNNCell(cell,state_is_tuple=True)
  output, _ = tf.nn.dynamic_rnn(cell=cell, inputs=features, dtype=tf.float32)
  </code></pre>
  
  <p>I do not have such error but the prediction is really bad.</p>
  
  <p>I define  <code>hidden=128</code>.</p>
  
  <p><code>features = tf.reshape(features, [-1, n_steps, n_input])</code> has shape <code>(?,1,14)</code> for single layer case.</p>
  
  <p>my data look like this <code>x.shape=(594,14), y.shape=(591,1)</code></p>
  
  <p>I am so confused how to stack LSTM cell in tensorflow. My tensorflow version is 0.14. </p>