RotatEInteraction
- class RotatEInteraction(*args, **kwargs)[source]
Bases:
FunctionalInteraction
[Tensor
,Tensor
,Tensor
]The RotatE interaction function proposed by [sun2019].
RotatE operates on complex-valued entity and relation representations, i.e., \(\textbf{e}_i, \textbf{r}_i \in \mathbb{C}^d\).
Note
this method generally expects all tensors to be of complex datatype, i.e., torch.is_complex(x) to evaluate to True. However, for backwards compatibility and convenience in use, you can also pass real tensors whose shape is compliant with
torch.view_as_complex()
, cf.pykeen.utils.ensure_complex()
.Initialize internal Module state, shared by both nn.Module and ScriptModule.
Attributes Summary
whether the interaction is defined on complex input
Methods Summary
func
(h, r, t)Evaluate the interaction function.
Attributes Documentation
Methods Documentation