What is sequential modelling in Keras?

This recipe explains what is sequential modelling in Keras

Recipe Objective

In keras we can build model in two ways, one is Sequential API and other is Functional API. Here we will try understand Sequential API.

In Sequential API we can build a model by adding layers to it one by one. By adding layers we can make a stack of layers which will be interconnected and can be used.

We can make a sequential model by using the sequential module from the keras library. In which we can pass two arguments(args).

PyTorch vs Tensorflow - Which One Should You Choose For Your Next Deep Learning Project ?

  • layers : In this we can pass the optional list of layers that we want in the model
  • name : In this we can give a name to the sequential model

keras.Sequential(layers=None, name=None)

Here is a short example of sequential model with two layers. #Defining model model = models.Sequential(layers=None, name=First_sequential_model) #Adding layers model.add(Dense(1024)) model.add(Dropout(0.5))

What Users are saying..

profile image

Anand Kumpatla

Sr Data Scientist @ Doubleslash Software Solutions Pvt Ltd
linkedin profile url

ProjectPro is a unique platform and helps many people in the industry to solve real-life problems with a step-by-step walkthrough of projects. A platform with some fantastic resources to gain... Read More

Relevant Projects

Build a Customer Churn Prediction Model using Decision Trees
Develop a customer churn prediction model using decision tree machine learning algorithms and data science on streaming service data.

Abstractive Text Summarization using Transformers-BART Model
Deep Learning Project to implement an Abstractive Text Summarizer using Google's Transformers-BART Model to generate news article headlines.

Time Series Project to Build a Multiple Linear Regression Model
Learn to build a Multiple linear regression model in Python on Time Series Data

Recommender System Machine Learning Project for Beginners-3
Content Based Recommender System Project - Building a Content-Based Product Recommender App with Streamlit

Learn How to Build PyTorch Neural Networks from Scratch
In this deep learning project, you will learn how to build PyTorch neural networks from scratch.

Topic modelling using Kmeans clustering to group customer reviews
In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

House Price Prediction Project using Machine Learning in Python
Use the Zillow Zestimate Dataset to build a machine learning model for house price prediction.

Stock Price Prediction Project using LSTM and RNN
Learn how to predict stock prices using RNN and LSTM models. Understand deep learning concepts and apply them to real-world financial data for accurate forecasting.

Classification Projects on Machine Learning for Beginners - 2
Learn to implement various ensemble techniques to predict license status for a given business.

NLP and Deep Learning For Fake News Classification in Python
In this project you will use Python to implement various machine learning methods( RNN, LSTM, GRU) for fake news classification.