Search⌘ K

Specify Model Architecture

Explore how to specify deep learning model architecture in Keras with the Sequential API. Learn to import necessary modules, add Dense layers with activation functions, and view model structure. This lesson helps you create basic input, hidden, and output layers for your deep learning models.

Keras model API’s

There are two ways to build a deep learning model in Keras:

1. Sequential API - Simple and easy to use

2. Functional API - Flexible and advanced

📝 Note: We will focus on Sequential since it is an easier way to build the model.

Sequential

The core idea of Sequential API is about arranging the Keras layers in sequential order. Hence the name, “Sequential API”. The API allows the data to flow from one layer to another layer in the given order until the data finally reaches the output layer.

Import the Sequential API:

The Sequential API can be imported from the keras.models API as ...