paint-brush
Multi-Class Classification: Understanding Activation and Loss Functions in Neural Networksby@owlgrey
1,265 reads
1,265 reads

Multi-Class Classification: Understanding Activation and Loss Functions in Neural Networks

by Dmitrii Matveichev January 24th, 2024
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

To build a multi-class classification neural network you need to use the softmax activation function on its final layer together with cross-entropy loss. The final layer size should be k, where k is the number of classes. The class IDs should be preprocessed with one-hot encoding. Such a neural network will output probabilities p_i that the input belongs to a class i. To find the predicted class ID you need to find the index of the maximum probability.
featured image - Multi-Class Classification: Understanding Activation and Loss Functions in Neural Networks
Dmitrii Matveichev  HackerNoon profile picture
Dmitrii Matveichev

Dmitrii Matveichev

@owlgrey

L O A D I N G
. . . comments & more!

About Author

Dmitrii Matveichev  HackerNoon profile picture
Dmitrii Matveichev @owlgrey

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite