title: Understanding the role of timestamp in Keras LSTM
body: <p>Given a signal dataset of 10232 signals, each of 200K dim <code>(10232, 200000)</code> made for a classification purpose. My understanding of Keras LSTM is that it accepts data in the format <code>(samples, timestamp, features)</code>. After reading many articles, it turns out that LSTM Keras accepts only data in 3D so we should first expend the input data from 2D to 3D. The following is a snapshot code:</p>
  <pre><code>X = np.expand_dims(X, -1) # ---&gt; (10232, 200000, 1)
  input_layer = Input(shape=(X.shape[1], X.shape[2]))
  lstm_ = LSTM(64, return_sequences=True)(input_layer)
  lstm_ = Dropout(0.2)(lstm_)
  lstm_ = LSTM(32, return_sequences=True)(lstm_)
  lstm_ = Dropout(0.2)(lstm_)
  lstm_ = LSTM(8)(lstm_)
  output_layer = Dense(1, activation='sigmoid')(lstm_)
  model = Model(inputs=input_layer, outputs=output_layer)
  </code></pre>
  <p>Making the timestamp equal to the dim of each time series <code>X.shape[1]</code>. My question is: What will happen if I choose <code>timestamp= 1000</code>, i.e., <code>Input(shape=(1000, X.shape[2]))</code>? I assume it means it somehow divides each time series that is originally of dim= 200K into samples each of dim= 1000. Would Keras create these samples, each of which has dim= 1000, for me or should I perform that manually?</p>
  <p>Thank you</p>