From the course: Neural Networks and Convolutional Neural Networks Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building the Keras model

Building the Keras model

From the course: Neural Networks and Convolutional Neural Networks Essential Training

Start my 1-month free trial

Building the Keras model

- [Instructor] So let's just visualize the model that we are trying to create, and remember that the reason that we're going from 784 nodes, that's the original number of pixels that we had, if you multiply 28 by 28. We then go down to 512 nodes in each of these layers, and then we need to go down to 10 nodes, because our output needs to be one of 10 digits, that's zero to nine, and that's why we end up with 10 nodes in our final output layer. So let's create our neural network, and we use that using Keras' sequential, so you call it model equals sequential, and then we're going to add the fully connected nodes, and we do that by using Keras' model add method, and we want to use a fully connected node, so we use dense. Now if you want to know the parameters that the dense mode is expecting, if we type a shift and a tab twice, you can see that it's expecting an output node. So we specify dense, we know that we're going to have 512 output nodes, we specify what activation function we…

Contents