This chapter covers
- Viewing the end-to-end training process
- Selecting subsets of the dataset for training, validation, and testing
- Doing an initial training run
- Measuring the performance of your model
- Optimizing your training time by exploiting Keras’ early stopping feature
- Shortcuts to scoring
- Saving trained models
- Running a series of training experiments to improve model performance
So far in this book, we have prepared the data and examined the code that makes up the model itself. Now we are finally ready to train the model. We’ll review some of the basics, including selecting the training, test, and validation dataset. Then we’ll go through an initial training run to validate that the code functions without errors and will cover the critical topic of monitoring your model’s performance. Next, we’ll show how to take advantage of the early stopping facility in Keras to get maximum benefit from your training runs. After that, we will go over how you can use your trained model to score a new record before you have the model fully deployed. Finally, we will run a series of experiments to improve the performance of the deep learning model.
When you have cloned the GitHub repo (http://mng.bz/v95x) associated with this book, you’ll find the code related to training the model in the notebooks sub-directory. The following listing shows the files that contain the code described in this chapter.