I don’t quite understand the example as both losses calculate the same (you just swapped the order or the logits and targets), so did you intend to change the logit of the negative class in the second example?