PairwiseLoss

class PairwiseLoss(reduction='mean')[source]

Bases: Loss

Pairwise loss functions compare the scores of a positive triple and a negative triple.

Initialize the loss.

Parameters

reduction (str) – the reduction, cf. _Loss.__init__