TorusEInteraction
- class TorusEInteraction(p: int = 2, power_norm: bool = False)[source]
Bases:
NormBasedInteraction
[Tensor
,Tensor
,Tensor
]The TorusE interaction function from [ebisu2018].
Note
This only implements the two L_p norm based variants.
Initialize the interaction module.
See also
The parameter
p
andpower_norm
are directly passed toNormBasedInteraction
.- Parameters:
p (int) – The norm used with
torch.linalg.vector_norm()
. Typically is 1 or 2.power_norm (bool) – Whether to use the p-th power of the \(L_p\) norm. It has the advantage of being differentiable around 0, and numerically more stable.
Methods Summary
forward
(h, r, t)Evaluate the interaction function.
Methods Documentation