class_docstr: A convex combination of regularizers.
class_docstr_tok: ["A","convex","combination","of","regularizers","."]
docstr: Initialize the regularizer.
  
  :param regularizers:
      the base regularizers
  :param total_weight:
      the total regularization weight distributed to the base regularizers according to their individual weights
  :param kwargs:
      additional keyword-based parameters passed to :meth:`Regularizer.__init__`
  :raises TypeError:
      if any of the regularizers are a no-op regularizer
docstr_tok: ["Initialize","the","regularizer",".",":","param","regularizers",":","the","base","regularizers",":","param","total_weight",":","the","total","regularization","weight","distributed","to","the","base","regularizers","according","to","their","individual","weights",":","param","kwargs",":","additional","keyword-based","parameters","passed","to",":","meth",":","`","Regularizer.__init__","`",":","raises","TypeError",":","if","any","of","the","regularizers","are","a","no-op","regularizer"]
code: def __init__(
      self,
      regularizers: Iterable[Regularizer],
      total_weight: float = 1.0,
      **kwargs,
  ):
      """
      Initialize the regularizer.
  
      :param regularizers:
          the base regularizers
      :param total_weight:
          the total regularization weight distributed to the base regularizers according to their individual weights
      :param kwargs:
          additional keyword-based parameters passed to :meth:`Regularizer.__init__`
      :raises TypeError:
          if any of the regularizers are a no-op regularizer
      """
      super().__init__(weight=total_weight, **kwargs)
      self.regularizers = nn.ModuleList(regularizers)
      for r in self.regularizers:
          if isinstance(r, NoRegularizer):
              raise TypeError("Can not combine a no-op regularizer")
      self.register_buffer(
          name="normalization_factor",
          tensor=torch.as_tensor(
              sum(r.weight for r in self.regularizers),
          ).reciprocal(),
      )
  
imports: from __future__ import annotations
  import warnings
  from abc import ABC, abstractmethod
  from typing import Any, ClassVar, Iterable, Mapping, Optional
  import torch
  from class_resolver import ClassResolver, normalize_string
  from torch import nn
  from torch.nn import functional
  from .utils import lp_norm, powersum_norm
label_desc: Use image node_id 1 to create a new CombinedRegularizer object from inherited base classes: Regularizer with example: obj = CombinedRegularizer(regularizers, total_weight)