I\'m trying to follow the Deep Autoencoder Keras example. I\'m getting a dimension mismatch exception, but for the life of me, I can\'t figure out why. It works when I use
Thanks for the hint from Marcin. Turns out all the decoder layers need to be unrolled in order to get it to work.
# retrieve the last layer of the autoencoder model
decoder_layer1 = autoencoder.layers[-3]
decoder_layer2 = autoencoder.layers[-2]
decoder_layer3 = autoencoder.layers[-1]
# create the decoder model
decoder = Model(input=encoded_input, output=decoder_layer3(decoder_layer2(decoder_layer1(encoded_input))))