title: RNN: What is the use of return_sequences in LSTM layer in Keras Framework
body: <p>I am working in RNN. I have following lines of code from some site.
  If you observe second layer has no "returnSequence" parameter.</p>
  
  <p>I am assuming return sequence is mandatory as it should return the sequences.
  Can you please tell why this is not defined.</p>
  
  <p>First layer LSTM:</p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>regressor.add(LSTM(units = 30, return_sequences = True))
  </code></pre>
  
  <p>Second layer LSTM:</p>
  
  <pre class="lang-python prettyprint-override"><code>regressor.add(LSTM(units = 30))
  </code></pre>