title: Setting initial state of LSTM layer
body: <p>I have the following code: </p>
  
  <pre><code>units = 1024
  lstm_layer = tf.keras.layers.LSTM(units)
  
  dim = tf.zeros([64,1024])
  
  output, hidden = lstm_layer(embedded_data, initial_state = dim)
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>ValueError: An `initial_state` was passed that is 
  not compatible with `cell.state_size`.
   Received `state_spec`=
  ListWrapper([InputSpec(shape=(64, 1024), ndim=2)]);
   however `cell.state_size` is [1024, 1024]
  </code></pre>
  
  <p>When I do it with a GRU cell instead of a LSTM cell, it works fine. But for a LSTM cell, this code does not work. I realize that LSTM takes two parameters, hence the code asking for a cell state of [1024,1024], but I don't know how to set the initial state. I tried </p>
  
  <pre><code>initial_state = [dim, dim] 
  </code></pre>
  
  <p>and that doesn't work either, as it gives me </p>
  
  <pre><code>ValueError: too many values to unpack (expected 2).
  </code></pre>
  
  <p>I referenced <a href="https://stackoverflow.com/questions/48233400/lstm-initial-state-from-dense-layer">LSTM Initial state from Dense layer</a> but doesn't seem to resolve my issue...</p>