I have a multi-class classification task. One of the standard approach in choosing loss function is to use a CrossEntropyLoss. It is a good option when classes are standonlone and not similar to each other.
What if some classes are more similar?
For example, if I have 10 classes, from 0
to 9
and classes with nearby numbers are closer to each other, i.e 4
and 6
are closer to 5
than 0
and 9
, etc.
How can I modify CrossEntropyLoss to reflect this fact? Or maybe already exists such loss function?