import time import keras from keras.utils import np_utils start = time.time() (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data() rows = 28 cols = 28 CLASSES = 10 x_train = x_train.reshape(x_train.shape[0], rows, cols, 1) x_test =…