In this example, we are going to implement a complete deep convolutional network using Keras and the original MNIST handwritten digits dataset (available through a Keras utility function). It is made up of 60,000 grayscale 28 × 28 images for training and 10,000 for testing the model. An example is shown in the following screenshot:
The first step consists in loading and normalizing the dataset so that each sample contains values bounded between 0 and 1:
from keras.datasets import mnist(X_train, Y_train), (X_test, Y_test) = mnist.load_data() ...