title: Getting the output of layer as a feature vector (KERAS)
body: <p>I have a CNN model in keras (used for signal classification):</p>
  
  <pre><code>    cnn = Sequential()
  
      cnn.add(Conv1D(10,kernel_size=8,strides=4, padding="same",activation="relu",input_shape=(Dimension_of_input,1)))
      cnn.add(MaxPooling1D(pool_size=3))
  
      cnn.add(Conv1D(10,kernel_size=8,strides=4, padding="same",activation="relu"))
      cnn.add(MaxPooling1D(2))
      cnn.add(Flatten())
  
      cnn.add(Dense(2, activation="softmax"))
  </code></pre>
  
  <p>Using the method 'model.summary()', I can get the shape of the output of each layer. In my model, the output of the last max pooling layer is (None, 1, 30) and of flatten layer is  (None, 30).   </p>
  
  <p>For each train and test sample: Is it possible in keras to get the output of the flatten layer as a feature vector with the 30 features (numbers), before it is given as input to the dense layer?? </p>