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 (`Union[float, tf.keras.optimizers.schedules.LearningRateSchedule]`, *optional*, defaults to 1e-3):
          The learning rate to use or a schedule.
      beta_1 (`float`, *optional*, defaults to 0.9):
          The beta1 parameter in Adam, which is the exponential decay rate for the 1st momentum estimates.
      beta_2 (`float`, *optional*, defaults to 0.999):
          The beta2 parameter in Adam, which is the exponential decay rate for the 2nd momentum estimates.
      epsilon (`float`, *optional*, defaults to 1e-7):
          The epsilon parameter in Adam, which is a small constant for numerical stability.
      amsgrad (`bool`, *optional*, default to `False`):
          Whether to apply AMSGrad variant of this algorithm or not, see [On the Convergence of Adam and
          Beyond](https://arxiv.org/abs/1904.09237).
      weight_decay_rate (`float`, *optional*, defaults to 0):
          The weight decay to apply.
      include_in_weight_decay (`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 `exclude_from_weight_decay`).
      exclude_from_weight_decay (`List[str]`, *optional*):
          List of the parameter names (or re patterns) to exclude from applying weight decay to. If a
          `include_in_weight_decay` is passed, the names in it will supersede this list.
      name (`str`, *optional*, defaults to 'AdamWeightDecay'):
          Optional name for the operations created when applying gradients.
      kwargs:
          Keyword 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.
class_docstr_tok: ["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","does","n'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","(","`","Union","[","float",",","tf.keras.optimizers.schedules.LearningRateSchedule","]","`",",","*","optional","*",",","defaults","to","1e-3",")",":","The","learning","rate","to","use","or","a","schedule",".","beta_1","(","`","float","`",",","*","optional","*",",","defaults","to","0.9",")",":","The","beta1","parameter","in","Adam",",","which","is","the","exponential","decay","rate","for","the","1st","momentum","estimates",".","beta_2","(","`","float","`",",","*","optional","*",",","defaults","to","0.999",")",":","The","beta2","parameter","in","Adam",",","which","is","the","exponential","decay","rate","for","the","2nd","momentum","estimates",".","epsilon","(","`","float","`",",","*","optional","*",",","defaults","to","1e-7",")",":","The","epsilon","parameter","in","Adam",",","which","is","a","small","constant","for","numerical","stability",".","amsgrad","(","`","bool","`",",","*","optional","*",",","default","to","`","False","`",")",":","Whether","to","apply","AMSGrad","variant","of","this","algorithm","or","not",",","see","[","On","the","Convergence","of","Adam","and","Beyond","]","(","https",":","\/\/arxiv.org\/abs\/1904.09237",")",".","weight_decay_rate","(","`","float","`",",","*","optional","*",",","defaults","to","0",")",":","The","weight","decay","to","apply",".","include_in_weight_decay","(","`","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","`","exclude_from_weight_decay","`",")",".","exclude_from_weight_decay","(","`","List","[","str","]","`",",","*","optional","*",")",":","List","of","the","parameter","names","(","or","re","patterns",")","to","exclude","from","applying","weight","decay","to",".","If","a","`","include_in_weight_decay","`","is","passed",",","the","names","in","it","will","supersede","this","list",".","name","(","`","str","`",",","*","optional","*",",","defaults","to","'AdamWeightDecay","'",")",":","Optional","name","for","the","operations","created","when","applying","gradients",".","kwargs",":","Keyword","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","."]
docstr: Creates an optimizer from its config with WarmUp custom object.
docstr_tok: ["Creates","an","optimizer","from","its","config","with","WarmUp","custom","object","."]
code: def from_config(cls, config):
      """Creates an optimizer from its config with WarmUp custom object."""
      custom_objects = {"WarmUp": WarmUp}
      return super(AdamWeightDecay, cls).from_config(
          config, custom_objects=custom_objects
      )
  
imports: import re
  from typing import Callable, List, Optional, Union
  import tensorflow
label_desc: Use image node_id 2 for calling the AdamWeightDecay obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: super