October 2018
Intermediate to advanced
472 pages
10h 57m
English
Now that we have loaded the data into memory, we need to build a simple neural network model to predict the MNIST digits. We will use the same architecture we used in Chapter 2, Training NN for Prediction Using Regression.
We will be building a Sequential model. So, let's import it from Keras and initialize it with the following code:
from keras.models import Sequentialmodel = Sequential()
The next thing that we need to do is define the Dense/Perceptron layer. In Keras, this can be done by importing the Dense layer, as follows:
from keras.layers import Dense
Then, we need to add the Dense layer to the Sequential ...
Read now
Unlock full access