title: Structure of training a LSTM model with Videos(constant number of frames)
body: <p>I have thousands of videos and each of them includes constant number of frames which is 35.
  I try to classify videos via training a LSTM model. But I do not know exactly how people keep the sequential structure of a video and train a LSTM model.</p>
  <p>Therefore what I want to do is;</p>
  <ol>
  <li>Read a video from dataset</li>
  <li>Get 35 frames of that video and extract features for each frame via CNN</li>
  <li>Feed those 35 frame features to LSTM layer - <strong>How could I feed each video(35 frames) to LSTM batch by batch?</strong></li>
  </ol>
  <p>The <a href="https://keras.io/models/sequential/" rel="nofollow noreferrer">fit</a> function in <a href="https://keras.io/" rel="nofollow noreferrer">Keras</a> is highly used. However <strong>I do not know how could I keep the sequential structure of the video while I read all the data in to the memory for the fit function.</strong></p>
  <pre><code>rm.model.fit(X,y,batch_size=batch_size, validation_data=(X_test, y_test),verbose=1, epochs=100)
  </code></pre>
  <p>Could someone please explain me how people train LSTM model with videos(N number of frames)</p>
  <p>I hope I could explain myself clearly.</p>
  <p>Thanks in advance</p>