For sparse categorical cross-entropy, you don’t need to one-hot encode 11 your class labels. It’s handled by the library itself. But for categorical cross-entropy the loss function expects the predictions and the true class labels to be in one-hot encoded form. It is beneficial when you would want to use something like label-smoothing 10 or any other method that modifies the marginal distributions.