← TensorFlow & Keras learning pathTensorFlow & Keras · Module 3 of 10
Building models with Keras
Create networks with Sequential and Functional APIs.
📖 Key ideas
- Sequential: keras.Sequential([layers.Dense(64, activation="relu"), layers.Dense(10, activation="softmax")]).
- Functional API builds models with multiple inputs/outputs.
- Subclassing keras.Model gives full flexibility.
- model.summary() shows layers and parameters.
- Common layers: Dense, Conv2D, MaxPooling2D, Dropout, LSTM, Embedding.
💡 Real-life example: Sequential models are a straight train; Functional models are a railway network with junctions.
SequentialLinear stack of layers
Functional APIGraph of layers
DenseFully connected layer
model.summary()Shows architecture