Complete code listing of the sparse autoencoder