Introduction
An overview of the Keras API and how it compares to TensorFlow.
We'll cover the following
In this chapter, you’ll learn how to use the Keras API, a simple and compact API for creating neural networks. You’ll use Keras to build a multilayer perceptron model for multiclass classification.
A. The Keras API
The most popular deep learning framework in the world is TensorFlow. It is incredibly powerful, efficient, and widely used in industry. However, a downside to TensorFlow is that the code can be a bit complex, especially when setting up a model for training or evaluation.
A simpler alternative to TensorFlow is Keras. The Keras API is easier to use than TensorFlow, allowing us to create, train, and evaluate a deep learning model with considerably less code. Interestingly, Keras is often run on top of TensorFlow, acting as a wrapper API to make the coding simpler.
Keras is excellent for building small deep learning projects, but TensorFlow is still the preferred framework for industry-level projects since it provides more utilities and efficient training mechanisms.
B. Multilayer perceptron
The MLP model is one of the most important neural networks for deep learning. It is a relatively simple model, but versatile enough for a variety of different applications. In this section, we'll be focusing on the Keras implementation of an MLP, rather than go into details on how it works or what it can be used for.
For specific details on the MLP model, see the previous chapter, "Deep Learning with TensorFlow."
Get hands-on with 1300+ tech skills courses.