title: How to train a RNN with LSTM cells for time series prediction
body: <p>I'm currently trying to build a simple model for predicting time series. The goal would be to train the model with a sequence so that the model is able to predict future values.</p>
  
  <p>I'm using tensorflow and lstm cells to do so. The model is trained with truncated backpropagation through time. My question is how to structure the data for training.</p>
  
  <p>For example let's assume we want to learn the given sequence:</p>
  
  <pre><code>[1,2,3,4,5,6,7,8,9,10,11,...]
  </code></pre>
  
  <p>And we unroll the network for <code>num_steps=4</code>.</p>
  
  <p><strong>Option 1</strong></p>
  
  <pre><code>input data               label     
  1,2,3,4                  2,3,4,5
  5,6,7,8                  6,7,8,9
  9,10,11,12               10,11,12,13
  ...
  </code></pre>
  
  <p><strong>Option 2</strong></p>
  
  <pre><code>input data               label     
  1,2,3,4                  2,3,4,5
  2,3,4,5                  3,4,5,6
  3,4,5,6                  4,5,6,7
  ...
  </code></pre>
  
  <p><strong>Option 3</strong></p>
  
  <pre><code>input data               label     
  1,2,3,4                  5
  2,3,4,5                  6
  3,4,5,6                  7
  ...
  </code></pre>
  
  <p><strong>Option 4</strong></p>
  
  <pre><code>input data               label     
  1,2,3,4                  5
  5,6,7,8                  9
  9,10,11,12               13
  ...
  </code></pre>
  
  <p>Any help would be appreciated.</p>