title: Visualizing intermediate layers in a custom model from keras
body: <p>I am currently running a ConvLSTM model from the official Keras repository. One of the more difficult parts about understanding the model is the difficulty to conceive what is happening at each stage of the process. The official code can be found <a href="https://github.com/keras-team/keras/blob/master/examples/conv_lstm.py" rel="nofollow noreferrer">here</a>.
  Looking at the sequence model, the multiple occurances of the batch norm and convolutional LSTM layers are not obvious choices and is pretty confusing to understand what they actually do.</p>
  <pre><code>seq = Sequential()
  seq.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                 input_shape=(None, 40, 40, 1),
                 padding='same', return_sequences=True))
  seq.add(BatchNormalization())
  
  seq.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                 padding='same', return_sequences=True))
  seq.add(BatchNormalization())
  
  seq.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                 padding='same', return_sequences=True))
  seq.add(BatchNormalization())
  
  seq.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                 padding='same', return_sequences=True))
  seq.add(BatchNormalization())
  </code></pre>
  <p>A bleak understanding of the same is that it helps to extract the frame's features leveraging the usefulness of convolutions when it comes to images. [The input is the frames of a video].
  It would be really helpful if I can visualize the output from each layer,it can help me better understand what the convolutionalLSTM layers are contributing to, at each stage. Any suggestions on how to go about it or pointers in that direction is appreciated. Thank you for your time.</p>