- class NormBasedInteraction(p, power_norm=False)[source]
Norm-based interactions use a (powered) \(p\)-norm in their scoring function.
Initialize the norm-based interaction function.
int) – The norm used with
torch.linalg.vector_norm(). Typically is 1 or 2.
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.