TorusE

class TorusE(embedding_dim=256, p=2, power_norm=False, entity_initializer=None, entity_initializer_kwargs=None, entity_normalizer=None, entity_normalizer_kwargs=None, relation_initializer=None, relation_initializer_kwargs=None, **kwargs)[source]

Bases: ERModel

An implementation of TorusE from [ebisu2018].

Initialize TorusE via the pykeen.nn.modules.TorusEInteraction interaction.

Parameters:
  • embedding_dim (int) – The entity embedding dimension \(d\).

  • p (int) – The p for the norm.

  • power_norm (bool) – Whether to use the p-th power of the L_p norm instead.

  • entity_initializer (Union[str, Callable[[FloatTensor], FloatTensor], None]) – Entity initializer function. Defaults to None

  • entity_initializer_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to be used when calling the entity initializer

  • entity_normalizer (Union[str, Callable[[FloatTensor], FloatTensor], None]) – Entity normalizer function. Defaults to None

  • entity_normalizer_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to be used when calling the entity normalizer

  • relation_initializer (Union[str, Callable[[FloatTensor], FloatTensor], None]) – Relation initializer function. Defaults to None

  • relation_initializer_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to be used when calling the relation initializer

  • kwargs – Remaining keyword arguments passed through to pykeen.models.ERModel.

Attributes Summary

hpo_default

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

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}, 'p': {'high': 2, 'low': 1, 'type': <class 'int'>}}

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