class ERMLPEInteraction(hidden_dim=300, input_dropout=0.2, hidden_dropout=0.3, embedding_dim=200)[source]

Bases: pykeen.nn.modules.FunctionalInteraction[torch.FloatTensor, torch.FloatTensor, torch.FloatTensor]

A stateful module for the ER-MLP (E) interaction function.

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

Methods Summary

func(r, t, mlp)

Evaluate the ER-MLPE interaction function.

Methods Documentation

func(r, t, mlp)

Evaluate the ER-MLPE interaction function.

  • h (FloatTensor) – shape: (batch_size, num_heads, 1, 1, dim) The head representations.

  • r (FloatTensor) – shape: (batch_size, 1, num_relations, 1, dim) The relation representations.

  • t (FloatTensor) – shape: (batch_size, 1, 1, num_tails, dim) The tail representations.

  • mlp (Module) – The MLP.

Return type



shape: (batch_size, num_heads, num_relations, num_tails) The scores.