Updated autoencoder to work for higher levels of hidden node layers