CombinedRegularizer
- class CombinedRegularizer(regularizers: Iterable[Regularizer], total_weight: float = 1.0, **kwargs)[source]
Bases:
Regularizer
A convex combination of regularizers.
Initialize the regularizer.
- Parameters:
regularizers (Iterable[Regularizer]) – the base regularizers
total_weight (float) – the total regularization weight distributed to the base regularizers according to their individual weights
kwargs – additional keyword-based parameters passed to
Regularizer.__init__()
- Raises:
TypeError – if any of the regularizers are a no-op regularizer
Attributes Summary
The default strategy for optimizing the regularizer's hyper-parameters
Methods Summary
forward
(x)Compute the regularization term for one tensor.
Attributes Documentation
- hpo_default: ClassVar[Mapping[str, Any]] = {'regularizers': (), 'total_weight': {'high': 1.0, 'low': 0.01, 'scale': 'log', 'type': <class 'float'>}}
The default strategy for optimizing the regularizer’s hyper-parameters
- normalize
Methods Documentation