SetwiseLoss

class SetwiseLoss(reduction: Literal['mean', 'sum'] = 'mean')[source]

Bases: Loss

Setwise loss functions compare the scores of several triples.

Initialize the loss.

Parameters:

reduction (Literal['mean', 'sum']) – the reduction, cf. pykeen.nn.modules._Loss