You can get output of any level, and not just the implementation layer, as described here :
from keras import backend as K
get_3rd_layer_output = K.function([model.layers[0].input],
[model.layers[3].output])
layer_output = get_3rd_layer_output([X])[0]
In your case, you need model.layers[0].outputinstead model.layers[3].output.
source
share