Loss function for classification into more than 2 classes

So, till now I have seen two loss functions. “BinaryCrossenthopy” and “MeanSquaredError”.
I am little confused with the first. The base of the confusion lies with the word Binary. Should this loss function be used for classification problem with exactly 2 classes or can it be used for any classification problems?
Thank you in advance.

Hi @Garvita,

Just as you thought, binary cross entropy loss is for binary problems, where the label just had two classes.
For more than two classes, another loss function is used, categorical cross entropy loss function, which is just a general extension of the binary case.

1 Like

Got it. Thanks