List of Listings

 

Chapter 2. Before we begin: the mathematical building blocks of neural networks

Listing 2.1. Loading the MNIST dataset in Keras

Listing 2.2. The network architecture

Listing 2.3. The compilation step

Listing 2.4. Preparing the image data

Listing 2.5. Preparing the labels

Chapter 3. Getting started with neural networks

Listing 3.1. Loading the IMDB dataset

Listing 3.2. Encoding the integer sequences into a binary matrix

Listing 3.3. The model definition

Listing 3.4. Compiling the model

Listing 3.5. Configuring the optimizer

Listing 3.6. Using custom losses and metrics

Listing 3.7. Setting aside a validation set

Listing 3.8. Training your model

Listing 3.9. Retraining a model from scratch

Listing 3.10. Loading the Reuters dataset

Listing 3.11. Decoding newswires back to text

Listing 3.12. Encoding the data

Listing 3.13. Model definition

Listing 3.14. Compiling the model

Listing 3.15. Setting aside a validation set

Listing 3.16. Training the model

Listing 3.17. Plotting the training and validation metrics

Listing 3.18. Retraining a model from scratch

Listing 3.19. Generating predictions for new data

Listing 3.20. A model with an information bottleneck

Listing 3.21. Loading the Boston housing dataset

Listing 3.22. Normalizing the data

Listing 3.23. Model definition

Listing 3.24. K-fold validation

Listing 3.25. Saving the validation logs at each fold

Listing 3.26. Building the history of successive mean K-fold validation scores