Autoencoder on the matrix representation