docstr: Extension class that adds weight decay to an optimizer.
  Args:
      weight_decay: A `Tensor` or a floating point value, the factor by
          which a variable is decayed in the update step.
      **kwargs: Optional list or tuple or set of `Variable` objects to
          decay.
docstr_tok: ["Extension","class","that","adds","weight","decay","to","an","optimizer",".","Args",":","weight_decay",":","A","`","Tensor","`","or","a","floating","point","value",",","the","factor","by","which","a","variable","is","decayed","in","the","update","step",".","*","*","kwargs",":","Optional","list","or","tuple","or","set","of","`","Variable","`","objects","to","decay","."]
code: def __init__(
      self, learning_rate, *, weight_decay, decay_var_list, **kwargs
  ):
      """Extension class that adds weight decay to an optimizer.
      Args:
          weight_decay: A `Tensor` or a floating point value, the factor by
              which a variable is decayed in the update step.
          **kwargs: Optional list or tuple or set of `Variable` objects to
              decay.
      """
      self.wd = weight_decay
      self.decay_var_list = decay_var_list
      super().__init__(learning_rate, **kwargs)
  
file_path: finetune/finetune/optimizers/weight_decay.py
imports: import tensorflow
  from tensorflow.python.ops import resource_variable_ops
label_desc: Use image node_id 1 to create a new AdamW object from inherited base classes: tf.compat.v1.train with example: obj = AdamW(learning_rate)