March 2020
Intermediate to advanced
366 pages
9h 8m
English
In order to train the classifier, we have to configure it for training. We have to specify an objective function (the loss function) and a training method. Additionally, we might want to specify some metrics in order to see how the model performs. We can configure the classifier using the compile method of the model:
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["categorical_accuracy","top_k_categorical_accuracy"])
We have passed metrics as categorical_accuracy, which will show which part of the dataset is classified with the right class. Besides this, we have passed one more metric called top_k_categorical_accuracy, which shows which part of the dataset is correct in the ...