Building Model using Sequential API
Here’s how you can define a Sequential model:
- We create a Sequential model.
- Add a fully connected (Dense) layer with 64 units and ReLU activation.
- Add another Dense layer with 10 units (for classification) and a softmax activation.
from keras.models import Sequential
from keras.layers import Dense, Activation
model = Sequential()
model.add(Dense(units=64, input_dim=100))
model.add(Activation('relu'))
model.add(Dense(units=10))
model.add(Activation('softmax'))
What is Keras?
Keras is an open-source deep-learning framework that gained attention due to its user-friendly interface. Keras offers ease of use, flexibility, and the ability to run seamlessly on top of TensorFlow. In this article, we are going to provide a comprehensive overview of Keras.
Table of Content
- Understanding Keras
- History of Keras
- Key Features of Keras Library
- How to Build a Model in Keras?
- Building Model using Sequential API
- Building Model using Functional API
- Applications of Keras