BCELoss vs BCEWithLogitsLoss

Yes.

  • logits → nn.BCEWithLogitsLoss
  • logits → sigmoid → nn.BCELoss

That would be the standard definition, but you can basically define True/False, Positive/Negative as you wish.

7 Likes