In this link, the author has implemented a CNN which classifies 15 classes and has used Binary Cross Entropy as the loss function. But since it's multiclass classification, is it valid to use Binary Cross Entropy? Or should we use Categorical Cross Entropy instead?
Use categorical_crossentropy when it comes for Multiclass classification, Because multiclass have more than one exclusive targets which is restricted by the binary_cross_entrophy.
binary_cross_entrophy is used when the target vector has only two levels of class.
In other cases when target vector has more than two levels categorical_crossentropy can be used for better model convergence.
It depends on the problem at hand.
Follow this schema:
Binary Cross Entropy: When your classifier must learn two classes. Used with one output node, with Sigmoid activation function and labels take values 0,1.
Categorical Cross Entropy: When you When your classifier must learn more than two classes. Used with as many output nodes as the number of classes, with Softmax activation function and labels are one-hot encoded.
It follows that Binary CE can be used for multiclass classification in case an observation can belong to multiple classes at the same time. In that case, belonging to one class doesn't inform the model on belonging to a different class and it's like if any node is an independent output.