PowerSumRegularizer¶
-
class
PowerSumRegularizer
(device, weight=1.0, dim=- 1, normalize=False, p=2.0, apply_only_once=False)[source]¶ Bases:
pykeen.regularizers.Regularizer
A simple x^p based regularizer.
Has some nice properties, cf. e.g. https://github.com/pytorch/pytorch/issues/28119.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Attributes Summary
The default strategy for optimizing the power sum regularizer’s hyper-parameters
Methods Summary
forward
(x)Compute the regularization term for one tensor.
Attributes Documentation
-
hpo_default
: ClassVar[Mapping[str, Any]] = {'weight': {'high': 1.0, 'low': 0.01, 'scale': 'log', 'type': <class 'float'>}}¶ The default strategy for optimizing the power sum regularizer’s hyper-parameters
Methods Documentation
-