MNIST classifier using MLP

TensorFlow supports auto-differentiation; we can use TensorFlow optimizer to calculate and apply gradients. It automatically updates the tensors defined as variables using the gradients. In this recipe, we will use the TensorFlow optimizer to train the network.