A Sequential model is the approachable Keras choice for a simple linear stack of layers: one input flows through each layer to one output. It is essentially a Python list of layers, so it works best when the model does not need branches, multiple inputs or outputs, or other graph-like connections. section 3.6.3 section 7.2
Build a small classifier
Create the stack directly, or add layers incrementally. This model transforms three input features through a 64-unit ReLU layer and produces ten softmax outputs: model = keras.Sequential([ layers.Dense(64, activation="relu"), layers.Dense(10, activation="softmax"), ]) The equivalent incremental form uses model.add(...), much like list.append(...). Give the model an input shape with keras.Input(shape=(3,)) when you want it built immediately and summarized as layers are added. section 7.2.1
Use the model-building and debugging workflow deliberately:
- Remember that layers create their weights only when the input shape is known. Calling the model on data or calling build(input_shape=...) builds it. section 7.2.1
- Call summary() after building to inspect output shapes and parameter counts; this is especially useful when layers transform inputs in complex ways. section 7.2.1
- Switch to the Functional API for directed acyclic graph architectures, or to model subclassing when you need low-level control. section 7.2 section 7.2.5
Figure 7.1 Progressive disclosure of complexity for model building
Use the complexity spectrum to compare Sequential models with the Functional API and model subclassing before choosing a construction style. section 7.2

