AdversarialBCEWithLogitsLoss
- class AdversarialBCEWithLogitsLoss(inverse_softmax_temperature: float = 1.0, reduction: str = 'mean')[source]
Bases:
AdversarialLoss
An adversarially weighted BCE loss.
Initialize the adversarial loss.
- Parameters:
Methods Summary
negative_loss_term_unreduced
(neg_scores[, ...])Calculate the loss for the negative scores without reduction.
positive_loss_term
(pos_scores[, ...])Calculate the loss for the positive scores.
Methods Documentation
- negative_loss_term_unreduced(neg_scores: Tensor, label_smoothing: float | None = None, num_entities: int | None = None) Tensor [source]
Calculate the loss for the negative scores without reduction.