I use CrossEntropy for calculating loss of 21 classes.(my first post in this topic).
But in my project , I must calculate loss of each class(for example class 1).
And for it,I use MSEloss for it.
I extract the parameters of class 1 in preds and target,then I used binary loss for it.
this post shows my project better.