!pip install scikit-plot
*******************************
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D,Reshape
from keras.layers import Flatten, Dense
import numpy as np
import matplotlib.pyplot as plt
from keras import models, layers, optimizers, utils, losses
from tensorflow.keras import datasets
import scikitplot as skplt
**************************
(x_train, y_train), (x_test, y_test) = datasets.mnist.load_data()
x_train = x_train.reshape(60000, 784)/255
x_test = x_test.reshape(10000, 784)/255
x_train = x_train[:1024,:]
x_test = x_test[:501,:]
y_train = utils.to_categorical(y_train, 10)
y_test = utils.to_categorical(y_test, 10)
y_train = y_train[:1024,:]
y_test = y_test[:501,:]
***********************
print(y_train.shape,x_train.shape)
print(y_test.shape,x_test.shape)
************************
my_model = Sequential()
# Création d'un réseau de neurones vide
my_model.add(Reshape((28, 28, 1)))
my_model.add(Conv2D(64, (3, 3), padding='same', input_shape=((28, 28,
1)), activation='relu'))
my_model.add(Conv2D(filters=64,kernel_size=(3,3),padding="same",
activation="relu"))
my_model.add(MaxPooling2D(pool_size=(2,2),strides=(2,2)))
my_model.add(Conv2D(filters=128, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=128, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(MaxPooling2D(pool_size=(2,2),strides=(2,2)))
my_model.add(Conv2D(filters=256, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=256, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=256, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(MaxPooling2D(pool_size=(2,2),strides=(2,2)))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(MaxPooling2D(pool_size=(2,2),strides=(2,2)))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Conv2D(filters=512, kernel_size=(3,3), padding="same",
activation="relu"))
my_model.add(Flatten())
# Conversion des matrices 3D en vecteur 1D
my_model.add(Dense(256, activation='relu'))