I have a multi-layer LSTM autoencoder with the following characteristics.
model = Sequential()
model.add(LSTM(250, dropout_U = 0.2, dropout_W = 0.2)) #L1
model.add(LSTM(150, dropout_U = 0.2, dropout_W = 0.2)) #L2
model.add(LSTM(100, dropout_U = 0.2, dropout_W = 0.2)) #L3
model.add(LSTM(150, dropout_U = 0.2, dropout_W = 0.2)) #L4
model.add(LSTM(250, dropout_U = 0.2, dropout_W = 0.2)) #L5
model.compile(optimizer='adam', loss='mse')
Simply in the test phase, I want to feed data in #L2 and get the output of #L4 then calculate the difference between the input and output of this representation layer.
How can I feed data in this middle layer? when I define input for #L2 layer Keras back error to me that the graph disconnected that it is reasonable.