For multi-class labels given as integers (0, 1, 2…), which loss is appropriate?
Correct answer
B. sparse_categorical_crossentropy
18 views
B. sparse_categorical_crossentropy
18 views
Sparse categorical cross-entropy accepts integer class IDs directly. categorical_crossentropy expects one-hot vectors, binary_crossentropy is for two-class or multi-label output, and KL divergence compares probability distributions.
Asked in: Data Science Interviews, AI Engineer Interviews
Not sure why the answer is B? Ask here and get an explanation.