MuRE
- class MuRE(*, embedding_dim: int = 200, p: int = 2, power_norm: bool = True, entity_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function normal_>, entity_initializer_kwargs: ~collections.abc.Mapping[str, ~typing.Any] | None = None, entity_bias_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function zeros_>, relation_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function normal_>, relation_initializer_kwargs: ~collections.abc.Mapping[str, ~typing.Any] | None = None, relation_matrix_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function uniform_>, relation_matrix_initializer_kwargs: ~collections.abc.Mapping[str, ~typing.Any] | None = None, **kwargs)[source]
Bases:
ERModel
An implementation of MuRE from [balazevic2019b].
Initialize MuRE via the
pykeen.nn.modules.MuREInteraction
interaction.- Parameters:
embedding_dim (int) – The entity embedding dimension \(d\). Defaults to 200. Is usually \(d \in [50, 300]\).
p (int) – The \(l_p\) norm. Defaults to 2.
power_norm (bool) – Should the power norm be used? Defaults to true.
entity_initializer (str | Callable[[Tensor], Tensor] | None) – Entity initializer function. Defaults to
torch.nn.init.normal_()
entity_initializer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the entity initializer
entity_bias_initializer (str | Callable[[Tensor], Tensor] | None) – Entity bias initializer function. Defaults to
torch.nn.init.zeros_()
relation_initializer (str | Callable[[Tensor], Tensor] | None) – Relation initializer function. Defaults to
torch.nn.init.normal_()
relation_initializer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the relation initializer
relation_matrix_initializer (str | Callable[[Tensor], Tensor] | None) – Relation matrix initializer function. Defaults to
torch.nn.init.uniform_()
relation_matrix_initializer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the relation matrix initializer
kwargs – Remaining keyword arguments passed through to
pykeen.models.ERModel
.
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
Attributes Documentation