Javatpoint Logo
Javatpoint Logo

Keras Sequential Class

Sequential class

The Keras sequential class helps to form a cluster of a layer that is linearly stacked into tf.keras.Model. The features of training and inference are provided by sequential to this model.


add Method

With the help of the add method, you will be permitted to add the layer's instance located at the top of the stack layer.


  • layer: It can be defined as an instance of a layer.


  • TypeError: The TypeError is generated in case if the layer is not an instance of a layer.
  • ValueError: If the argument called layer is not aware of the shape of the input, then the ValueError is generated.
  • ValueError: In case if the layer argument encompasses several tensor output or simply, we can say it is connected anywhere like forbidden in the Sequential model.

pop Method

It helps in the removal of the last layer from the model.


  • TypeError: This type of error is generated if it consists of a single layer within the model.

Next TopicKeras Core Layers

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA