UMInteraction
- class UMInteraction(p, power_norm=True)[source]
Bases:
pykeen.nn.modules.NormBasedInteraction
[torch.FloatTensor
,None
,torch.FloatTensor
]A stateful module for the UnstructuredModel interaction function.
See also
pykeen.nn.functional.unstructured_model_interaction()
Initialize the norm-based interaction function.
- Parameters
p (
int
) – The norm used withtorch.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.
Attributes Summary
The symbolic shapes for relation representations
Methods Summary
func
(t, p[, power_norm])Evaluate the SimplE interaction function.
Attributes Documentation
Methods Documentation
- func(t, p, power_norm=True)
Evaluate the SimplE interaction function.
- Parameters
- Return type
FloatTensor
- Returns
shape: batch_dims The scores.