TensorFlow-based MLP for MNIST classification