Extract feature vector of a CNN How can I get the feature vector of my dataset. I have a fine-tuned CNN model with my data. Now I want to feed the features of all my dataset extracted from the last layer of the CNN into a LSTM. 

So far I have 

cnn_model = load_model('weights/pre-trained_CNN.hdf5')
cnn_output = cnn_model.get_layer('fc7').output


I know I will have to feed all my dataset into this model but I have no idea on how to "save" the features.
In order to "tap" intermediate layers of an existing model you could do the following:

# get your feature layer
cnn_model = load_model('weights/pre-trained_CNN.hdf5')
feature_layer = cnn_model.get_layer('fc7')

# stack your LSTM and other layers below, e.g.:
lstm_layer = TimeDistributed(LSTM(...), input_shape = ...)(feature_layer)
output = Dense(...)(lstm_layer)

# create a combined model 
model = Model(inputs = cnn_model.input, outputs = [output])