January 2018
Intermediate to advanced
474 pages
10h 23m
English
In the sequential API, create the empty model with the following code:
model = Sequential()
You can now add the layers to this model, which we will see in the next section.
Alternatively, you can also pass all the layers as a list to the constructor. As an example, we add four layers by passing them to the constructor using the following code:
model = Sequential([ Dense(10, input_shape=(256,)), Activation('tanh'), Dense(10), Activation('softmax') ])
Read now
Unlock full access