Using a sequential method to build a neural network
So far, we have learned how to implement a neural network using the class of neural networks where we manually built each layer. However, unless we are building a complicated network, the steps to build a neural network architecture are straightforward, where we specify the layers and the sequence with which layers are to be stacked. Let’s move on and learn about a simplified way of defining the neural network architecture using the Sequential
class.
We will perform the same steps that we did in the previous sections, except that the class that was used to define the neural network architecture manually will be substituted with a Sequential
class to create a neural network architecture. Let’s code up the network for the same toy data that we have worked on in this chapter:
The following code is available as Sequential_method_to_build_a_neural_network.ipynb
in the Chapter02
folder of this book’s...