Working MNIST logistic regressor.