An information theoretic approach to the autoencoder