RotatEInteraction
- class RotatEInteraction[source]
Bases:
pykeen.nn.modules.FunctionalInteraction
[torch.FloatTensor
,torch.FloatTensor
,torch.FloatTensor
]A module wrapper for the stateless RotatE interaction function.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods Summary
func
(r, t)Evaluate the RotatE interaction function.
Methods Documentation
- func(r, t)
Evaluate the RotatE interaction function.
- Parameters
h (
FloatTensor
) – shape: (batch_size, num_heads, 1, 1, 2*dim) The head representations.r (
FloatTensor
) – shape: (batch_size, 1, num_relations, 1, 2*dim) The relation representations.t (
FloatTensor
) – shape: (batch_size, 1, 1, num_tails, 2*dim) The tail representations.
- Return type
FloatTensor
- Returns
shape: (batch_size, num_heads, num_relations, num_tails) The scores.