How to solve Multi-Class Classification Problems in Deep Learning with Tensorflow & Keras?
This is the third part of the “How to solve Classification Problems in Keras?” series. If you have not gone over Part A and Part B, please review them before continuing with this tutorial. The link to all parts is provided below.
In this tutorial, we will focus on how to solve Multi-Class Classification Problems in Deep Learning with Tensorflow & Keras. First, we will download the MNIST dataset. In multi-class classification problems, we have two options to encode the true labels by using either:
- integer numbers, or
- one-hot vector
We will experiment with both encodings to observe the effect of the combinations of various last-layer activation functions and loss functions on a Keras CNN model’s performance. In both experiments, we will discuss the relationship between Activation & Loss functions, label encodings, and accuracy metrics in detail.
We will understand why sometimes we could get surprising results when using different parameter settings other than the generally recommended ones. As a result, we will gain insight into activation and loss functions and their interactions. In the end, we will summarize the experiment results in a cheat table.
You can access the code at Colab and all the posts of the classification tutorial series at muratkarakaya.net. You can watch all these parts on YouTube in ENGLISH or TURKISH as well.
If you are ready, let’s get started!
Photo by Debby Hudson on Unsplash