CategoricalAccuracy vs. SparseCategoricalAccuracy numbers' comparability

Hello everyone,

I have a simple question: suppose I have the same dataset and the same model, the only difference being target sequence’s encoding, in one case it’s sparse and in one case it’s one-hot encoding. I run the model two times, once with categorical entropy loss and once with sparse categorical entropy loss.

If I check Categorical Accuracy and Sparse Categorical Accuracy for the results, are those comparable? I.e., assume model predicts training data with 0.9 accuracy, will both categorical accuracy and sparse categorical accuracy show me 0.9 or will there be a difference in numbers?

Hi @acraev, Both Categorical_Cross_Entropy and Sparse_Categorical_Cross_Entropy have the same loss function. The only difference between the two is on how truth labels are defined. Thank You.