Multi-Class Classification: Understanding Activation and Loss Functions in Neural Networks
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.