docstr: Construct an ADAMW optimizer.
  
  Parameters
  ----------
  lr
      Learning rate, default is ``1e-4``.
  beta1
      gradient forgetting factor, default is ``0.9``
  beta2
      second moment of gradient forgetting factor, default is ``0.999``
  epsilon
      divisor during adamw update, preventing division by zero,
      default is ``1e-07``
  weight_decay
      weight decay coefficient, default is ``0.0``
  inplace
      Whether to update the variables in-place, or to create new variable handles.
      This is only relevant for frameworks with stateful variables such as
      PyTorch.
      Default is ``True``, provided the backend framework supports it.
  stop_gradients
      Whether to stop the gradients of the variables after each gradient step.
      Default is ``True``.
  trace_on_next_step
      Whether to trace the optimizer on the next step. Default is ``False``.
  device
      Device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
      etc. (Default value = None)
docstr_tok: ["Construct","an","ADAMW","optimizer",".","Parameters","--","--","--","--","--","lr","Learning","rate",",","default","is","``","1e-4","``",".","beta1","gradient","forgetting","factor",",","default","is","``","0.9","``","beta2","second","moment","of","gradient","forgetting","factor",",","default","is","``","0.999","``","epsilon","divisor","during","adamw","update",",","preventing","division","by","zero",",","default","is","``","1e-07","``","weight_decay","weight","decay","coefficient",",","default","is","``","0.0","``","inplace","Whether","to","update","the","variables","in-place",",","or","to","create","new","variable","handles",".","This","is","only","relevant","for","frameworks","with","stateful","variables","such","as","PyTorch",".","Default","is","``","True","``",",","provided","the","backend","framework","supports","it",".","stop_gradients","Whether","to","stop","the","gradients","of","the","variables","after","each","gradient","step",".","Default","is","``","True","``",".","trace_on_next_step","Whether","to","trace","the","optimizer","on","the","next","step",".","Default","is","``","False","``",".","device","Device","on","which","to","create","the","layer","'s","variables","'cuda:0","'",",","'cuda:1","'",",","'cpu'","etc",".","(","Default","value","=","None",")"]
code: def __init__(
      self,
      lr: float = 1e-4,
      beta1: float = 0.9,
      beta2: float = 0.999,
      epsilon: float = 1e-07,
      weight_decay: float = 0.0,
      inplace: bool = True,
      stop_gradients: bool = True,
      trace_on_next_step: bool = False,
      device: Optional[Union[ivy.Device, ivy.NativeDevice]] = None,
  ):
      """Construct an ADAMW optimizer.
  
      Parameters
      ----------
      lr
          Learning rate, default is ``1e-4``.
      beta1
          gradient forgetting factor, default is ``0.9``
      beta2
          second moment of gradient forgetting factor, default is ``0.999``
      epsilon
          divisor during adamw update, preventing division by zero,
          default is ``1e-07``
      weight_decay
          weight decay coefficient, default is ``0.0``
      inplace
          Whether to update the variables in-place, or to create new variable handles.
          This is only relevant for frameworks with stateful variables such as
          PyTorch.
          Default is ``True``, provided the backend framework supports it.
      stop_gradients
          Whether to stop the gradients of the variables after each gradient step.
          Default is ``True``.
      trace_on_next_step
          Whether to trace the optimizer on the next step. Default is ``False``.
      device
          Device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
          etc. (Default value = None)
      """
      self._weight_decay = weight_decay
      super().__init__(
          lr,
          beta1,
          beta2,
          epsilon,
          inplace,
          stop_gradients,
          trace_on_next_step,
          device,
      )
  
imports: import abc
  from typing import Union, Optional, Callable
  import ivy
label_desc: Use image node_id 1 to create a new AdamW object from inherited base classes: Adam with example: obj = AdamW(lr, beta1, beta2, epsilon, weight_decay, inplace, stop_gradients, trace_on_next_step, device)