Could someone please explain to me why the autoencoder is not converging? To me the results of the two networks below should be the same. However, the autoencoder below is not converging, whereas, the network beneath it is.
# autoencoder implementation, does not converge
autoencoder = Sequential()
encoder = containers.Sequential([Dense(32,16,activation='tanh')])
decoder = containers.Sequential([Dense(16,32)])
autoencoder.add(AutoEncoder(encoder=encoder, decoder=decoder,
output_reconstruction=True))
rms = RMSprop()
autoencoder.compile(loss='mean_squared_error', optimizer=rms)
autoencoder.fit(trainData,trainData, nb_epoch=20, batch_size=64,
validation_data=(testData, testData), show_accuracy=False)
# non-autoencoder implementation, converges
model = Sequential()
model.add(Dense(32,16,activation='tanh'))
model.add(Dense(16,32))
model.compile(loss='mean_squared_error', optimizer=rms)
model.fit(trainData,trainData, nb_epoch=numEpochs, batch_size=batch_size,
validation_data=(testData, testData), show_accuracy=False)