ComplExLiteralCombination

class ComplExLiteralCombination(entity_embedding_dim, literal_embedding_dim, input_dropout=0.0, activation=<class 'torch.nn.modules.activation.Tanh'>)[source]

Bases: pykeen.nn.combinations.ParameterizedComplexCombination

The linear/dropout/tanh combination used in pykeen.models.ComplExLiteral.

Instantiate the ParameterizedComplexCombination with a LinearDropout for real and complex.

Parameters
  • entity_embedding_dim (int) – The dimension of the entity representations to which literals are concatenated

  • literal_embedding_dim (int) – The dimension of the literals that are concatenated

  • input_dropout (float) – The dropout probability of an element to be zeroed.

  • activation (Union[str, Module, Type[Module], None]) – The activation function, resolved by pykeen.utils.activation_resolver.

This class uses a torch.nn.Tanh by default for the activation to the LinearDropout as described by [kristiadi2018].