MarginRankingLoss

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

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

A wrapper around the PyTorch margin ranking loss.

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

Attributes Summary

hpo_default

The default strategy for optimizing the model’s hyper-parameters

synonyms

Attributes Documentation

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

The default strategy for optimizing the model’s hyper-parameters

synonyms: ClassVar[Optional[Set[str]]] = {'Pairwise Hinge Loss'}