Understanding autoencoders