Train and classify a small rbm on mnist.