For the completion of the model, we need to choose a loss in the optimizer and the metrics that we're concerned with during fitting:
model.compile(loss ="categorical_crossentropy", optimizer= 'SGD', metrics = ['accuracy'])
print(model.summary())
Let's look at the output after compiling the model:
Fig 6.20: Compiling the model
In the next section, we will train the model.