Keras: Sequential Model
Keras: Sequential Model


The Sequential model
The Sequential model
A Sequential model is appropriate for a plain stack of layers where each layer has exactly one input tensor and one output tensor.

Equivalent to:
A Sequential model is not appropriate when:
Your model has multiple inputs or multiple outputs
Any of your layers has multiple inputs or multiple outputs
You need to do layer sharing
You want non-linear topology 	


Creating a Sequential model
Creating a Sequential model
You can create a Sequential model by passing a list of layers to the Sequential constructor:






Its layers are accessible via the layers attribute:
model.layers
You can also create a Sequential model incrementally via the add() method:

There's also a corresponding pop() method to remove layers: a Sequential model behaves very much like a list of layers.



Sequential constructor accepts a name argument, just like any layer or model in Keras