DistMAInteraction
- class DistMAInteraction(*args, **kwargs)[source]
Bases:
FunctionalInteraction
[Tensor
,Tensor
,Tensor
]The stateless DistMA interaction function from [shi2019].
For head entity, relation, and tail representations \(\mathbf{h}, \mathbf{r}, \mathbf{t} \in \mathbb{R}^d\), the interaction functions is given by
\[\langle \mathbf{h}, \mathbf{r}\rangle + \langle \mathbf{r}, \mathbf{t}\rangle + \langle \mathbf{h}, \mathbf{t}\rangle\]Note
This interaction function is the symmetric part \(E_1\) from the respective paper, and not the combination with
ComplExInteraction
.Initialize internal Module state, shared by both nn.Module and ScriptModule.
Methods Summary
func
(h, r, t)Evaluate the interaction function.
Methods Documentation