class_docstr: ```
  Adam enables L2 weight decay and clip_by_global_norm on gradients. Just adding the square of the weights to the
  loss function is *not* the correct way of using L2 regularization/weight decay with Adam, since that will interact
  with the m and v parameters in strange ways as shown in
  `Decoupled Weight Decay Regularization <https://arxiv.org/abs/1711.05101>`__.
  Instead we want ot decay the weights in a manner that doesn't interact with the m/v parameters. This is equivalent
  to adding the square of the weights to the loss with plain (non-momentum) SGD.
  Args:
      learning_rate (:obj:`Union[float, tf.keras.optimizers.schedules.LearningRateSchedule]`, `optional`, defaults to 1e-3):
          The learning rate to use or a schedule.
      beta_1 (:obj:`float`, `optional`, defaults to 0.9):
          The beta1 parameter in Adam, which is the exponential decay rate for the 1st momentum estimates.
      beta_2 (:obj:`float`, `optional`, defaults to 0.999):
          The beta2 parameter in Adam, which is the exponential decay rate for the 2nd momentum estimates.
      epsilon (:obj:`float`, `optional`, defaults to 1e-7):
          The epsilon paramenter in Adam, which is a small constant for numerical stability.
      amsgrad (:obj:`bool`, `optional`, default to `False`):
          Wheter to apply AMSGrad varient of this algorithm or not, see
          `On the Convergence of Adam and Beyond <https://arxiv.org/abs/1904.09237>`__.
      weight_decay_rate (:obj:`float`, `optional`, defaults to 0):
          The weight decay to apply.
      include_in_weight_decay (:obj:`List[str]`, `optional`):
          List of the parameter names (or re patterns) to apply weight decay to. If none is passed, weight decay is
          applied to all parameters by default (unless they are in :obj:`exclude_from_weight_decay`).
      exclude_from_weight_decay (:obj:`List[str]`, `optional`):
          List of the parameter names (or re patterns) to exclude from applying weight decay to. If a
          :obj:`include_in_weight_decay` is passed, the names in it will supersede this list.
      name (:obj:`str`, `optional`, defaults to 'AdamWeightDecay'):
          Optional name for the operations created when applying gradients.
      kwargs:
          Keyward arguments. Allowed to be {``clipnorm``, ``clipvalue``, ``lr``, ``decay``}. ``clipnorm`` is clip
          gradients by norm; ``clipvalue`` is clip gradients by value, ``decay`` is included for backward
          compatibility to allow time inverse decay of learning rate. ``lr`` is included for backward compatibility,
          recommended to use ``learning_rate`` instead.
  ```
code: def __init__(
      self,
      learning_rate: Union[
          float, tf.keras.optimizers.schedules.LearningRateSchedule
      ] = 0.001,
      beta_1: float = 0.9,
      beta_2: float = 0.999,
      epsilon: float = 1e-7,
      amsgrad: bool = False,
      weight_decay_rate: float = 0.0,
      include_in_weight_decay: Optional[List[str]] = None,
      exclude_from_weight_decay: Optional[List[str]] = None,
      name: str = "AdamWeightDecay",
      **kwargs,
  ):
      super().__init__(
          learning_rate,
          beta_1,
          beta_2,
          epsilon,
          amsgrad,
          name,
          **kwargs,
      )
      self.weight_decay_rate = weight_decay_rate
      self._include_in_weight_decay = include_in_weight_decay
      self._exclude_from_weight_decay = exclude_from_weight_decay
  
imports: import re
  from typing import Callable, List, Optional, Union
  import tensorflow
  from packaging import version
label_desc: Use image node_id 1 to create a new AdamWeightDecay object from inherited base classes: adam_class with example: obj = AdamWeightDecay(learning_rate, beta_1, beta_2, epsilon, amsgrad, weight_decay_rate, include_in_weight_decay, exclude_from_weight_decay, name)