MarginRankingLoss

class MarginRankingLoss(margin=0.0, size_average=None, reduce=None, reduction='mean')[source]

Bases: torch.nn.modules.loss.MarginRankingLoss, pykeen.losses.PairwiseLoss

A wrapper around the PyTorch margin ranking loss.

Initializes internal Module state, shared by both nn.Module and ScriptModule.

Attributes Summary

hpo_default

synonyms

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'margin': {'high': 3, 'low': 0, 'q': 1, 'type': <class 'int'>}}
synonyms: ClassVar[Optional[Set[str]]] = {'Pairwise Hinge Loss'}