AdversarialBCEWithLogitsLoss
- class AdversarialBCEWithLogitsLoss(inverse_softmax_temperature=1.0, reduction='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, label_smoothing=None, num_entities=None)[source]
Calculate the loss for the negative scores without reduction.
- Parameters
- Return type
FloatTensor
- Returns
scalar the unreduced loss term for negative scores