0
$\begingroup$

As we know that in AI tools like tensorflow has loss named sparse_categorical_crossentropy which bassically categorical_crossentropy. The different is, categorical_crossentropy for one-hot encoding while sparse_categorical_crossentropy is for label encoding or integer encoding. In a nutshell, sparse_categorical_crossentropy will convert the label encoding to one-hot encoding at the end CMIIW.

Encoding label encoding commonly use incremental integer such as [0, 1, 0, 2, 0] that has unique value (0, 1, 2) therefore it is 3 classes.

So I want to confirm if sparse_categorical_crossentropy support custom label encoding such as [0, 27, 27, 0, 0, 24, 24, 0, 1, 1,] that has unique value (0, 1, 24, 27) or 4 classes; in any tensor processing tools.

$\endgroup$

0

You must log in to answer this question.