How to train a convolutional neural network using Keras on MNIST dataset