@albanD, now that O think about it, what does the ones vector mean?
Because suppose the true labels are [0 0 1 0 0 1].
and by multiplying output_cl * label I will get [0 0.5 0 0.5 0.5 0.5].
So the logic of derivation according to the multiclass labels and optimization problem should be:
[0 0.5 0 0.5 0.5 0.5].backward(gradient=[0 0 1 0 0 1]) isn’t it ?
because I want 1’s only in the true labels position (suppose in is one hot encoding), and not [1 1 1 1 1 1].