AdversarialBCEWithLogitsLoss
- class AdversarialBCEWithLogitsLoss(inverse_softmax_temperature: float = 1.0, reduction: Literal['mean', 'sum'] = 'mean')[source]
Bases:
AdversarialLossAn 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) Tensor[source]
Calculate the loss for the negative scores without reduction.