2 Deep neural networks

 

This chapter covers

  • Breaking down the structure of neural networks and deep neural networks
  • Using feed-forward and backward propagation during training to learn model weights
  • Coding neural network models in both TF.Keras sequential and functional APIs
  • Understanding the various types of model tasks
  • Using strategies to prevent overfitting

This chapter starts with some basics on neural networks. Once you’ve gotten the basics down, I’ll introduce you to how deep neural networks (DNNs) can be easily coded using TF.Keras, which has two styles for coding neural networks: a sequential API and functional API. We will code examples using both styles.

This chapter also covers the fundamental types of models. Each model type, such as regression and classification, learns different types of tasks. The task you want to learn determines the model type you will design. You’ll also learn the fundamentals of weights, biases, activations, and optimizers, and how they contribute to the accuracy of the model.

To wrap up this chapter, we’ll code an image classifier. And finally, I’ll introduce the problem of overfitting when training along with an early approach to solving overfitting with dropout.

2.1 Neural network basics

2.1.1 Input layer

2.1.2 Deep neural networks

2.1.3 Feed-forward networks

2.1.4 Sequential API method

2.1.5 Functional API method

2.1.6 Input shape vs. input layer

2.1.7 Dense layer

2.1.8 Activation functions

2.1.9 Shorthand syntax

2.1.10 Improving accuracy with an optimizer

2.2 DNN binary classifier

2.3 DNN multiclass classifier