PointwiseLoss

class PointwiseLoss(reduction: str = 'mean')[source]

Bases: Loss

Pointwise loss functions compute an independent loss term for each triple-label pair.

Initialize the loss.

Parameters:

reduction (str) – the reduction, cf. pykeen.nn.modules._Loss

Methods Summary

validate_labels(labels)

Check whether labels are in [0, 1].

Methods Documentation

static validate_labels(labels: Tensor) bool[source]

Check whether labels are in [0, 1].

Parameters:

labels (Tensor)

Return type:

bool