Updated autoencoder to fix bug.