Project Creation: Part Three
In this lesson, we will finally train our model and visualize the accuracy and loss.
In the previous lesson, our model architecture was read. Now, before moving to actual training, I want to first introduce you to something new.
Callbacks in Keras
Many times when we are training our model, we see that the training accuracy starts decreasing after a certain number of epochs and our model ends up with low accuracy (although we achieved high accuracy in previous epochs). So, how can we get the best model out of all the epochs? The answer is callbacks.
A callback is an object that can perform actions at various stages of training, e.g., at the start or end of an epoch, before or after a single batch, etc.
We will discuss two types of callbacks and use them in our project.
1. ModelCheckpoint
The ModelCheckpoint
callback is used in conjunction with training to save a model ...