Search⌘ K

Keras: TensorFlow's Model-Building API

Explore the different Keras APIs integrated into TensorFlow for building neural networks. Understand how the Sequential, Functional, and Subclassing APIs work, their flexibility levels, and how to define models using each method. This lesson helps you grasp Keras model-building approaches to effectively design and implement deep learning models in TensorFlow.

Keras was developed as a separate library that provides high-level building blocks to build models conveniently. It was initially platform agnostic and supported many softwares (for example, TensorFlow and Theano).

However, TensorFlow acquired Keras, and now Keras is an integral part of TensorFlow for building models effortlessly.

APIs provided by Keras

Keras’s primary focus is model building. For that, Keras provides several different APIs with varying degrees of flexibility and complexity. Choosing the right API for the job will require a sound knowledge of the limitations of each API as well as experience. The APIs provided by Keras are:

  • Sequential API: This is the most easy-to-use API. In this API, we simply stack layers on top of each other to create a model.

  • Functional API: The functional API provides more flexibility by allowing us to define custom models that can have multiple input layers and ...