title: How to build an LSTM time-series forecasting model in python?
body: <p>I'm trying to build an LSTM model, data consists of date_time &amp; some numeric values. While fitting the model, its getting </p>
  
  <pre><code>"ValueError: Error when checking input: expected lstm_1_input to have 3 dimensions, but got array with shape (10, 1)" error.
  </code></pre>
  
  <p>Sample data:
  "date.csv" looks like: </p>
  
  <pre><code>Date
  
  06/13/2018 07:20:04 PM
  
  06/13/2018 07:20:04 PM
  
  06/13/2018 07:20:04 PM
  
  06/13/2018 07:22:12 PM
  
  06/13/2018 07:22:12 PM
  
  06/13/2018 07:22:12 PM
  
  06/13/2018 07:26:20 PM
  
  06/13/2018 07:26:20 PM
  
  06/13/2018 07:26:20 PM
  
  06/13/2018 07:26:20 PM
  </code></pre>
  
  <p>"tasks.csv" looks like :</p>
  
  <pre><code>Tasks
  
  2
  
  1
  
  2
  
  1
  
  4
  
  2
  
  3
  
  2
  
  3
  
  4
  </code></pre>
  
  <pre><code>    date = pd.read_csv('date.csv')
      task = pd.read_csv('tasks.csv')
      model = Sequential()
      model.add(LSTM(24,return_sequences=True,input_shape=(date.shape[0],1)))
      model.add(Dense(1))
      model.compile(loss="mean_squared_error", optimizer="adam")
      model.fit(date, task,  epochs=100,  batch_size=1,  verbose=1)
  </code></pre>
  
  <p>How can I forecast the result?</p>