1

Can somebody please tell me the difference between loss calculators,loss = keras.losses.categorical_crossentropy and loss = 'sparse_categorical_crossentropy' for CNN models. keras.losses.categorical_crossentropy is only compatible with the train label array shape, as (60000,10) for MNIST data set, and 'sparse_categorical_crossentropy' is compatible with the input shape (60000,1). Why is it so ? And How does these two differ mathematically?

Roshin Raphel
  • 2,612
  • 4
  • 22
  • 40

0 Answers0