Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
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.

Example






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.

Arguments

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

Raises

  • 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.

Raises

  • 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

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA