ConvKB

class ConvKB(*, embedding_dim: int = 200, hidden_dropout_rate: float = 0.0, num_filters: int = 400, regularizer: ~pykeen.regularizers.Regularizer | None = None, entity_initializer: str | ~collections.abc.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function uniform_>, relation_initializer: str | ~collections.abc.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function uniform_>, **kwargs)[source]

Bases: ERModel[Tensor, Tensor, Tensor]

An implementation of ConvKB from [nguyen2018].

ConvKB represents entities and relations using a \(d\)-dimensional embedding vectors, which are stored as Embedding. ConvKBInteraction is used to obtain triple scores.

See also

Initialize the model.

Parameters:

To be consistent with the paper, pass entity and relation embeddings pre-trained from TransE.

Attributes Summary

hpo_default

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

regularizer_default_kwargs

The LP settings used by [nguyen2018] for ConvKB.

Attributes Documentation

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}, 'hidden_dropout_rate': {'high': 0.5, 'low': 0.0, 'q': 0.1, 'type': <class 'float'>}, 'num_filters': {'high': 9, 'low': 7, 'scale': 'power_two', 'type': <class 'int'>}}

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

regularizer_default_kwargs: ClassVar[Mapping[str, Any]] = {'apply_only_once': True, 'normalize': True, 'p': 2.0, 'weight': 0.0005}

The LP settings used by [nguyen2018] for ConvKB.