code: def nadamw(
      params: List[Tensor],
      grads: List[Tensor],
      exp_avgs: List[Tensor],
      exp_avg_sqs: List[Tensor],
      state_steps: List[Tensor],
      foreach: Optional[bool] = None,
      capturable: bool = False,
      *,
      beta1: float,
      beta2: float,
      lr: float,
      weight_decay: float,
      eps: float,
      maximize: bool,
  ) -> None:
      r"""Functional API that performs NAdamW algorithm computation.
      See NAdamW class for details.
      """
  
      if not all(isinstance(t, torch.Tensor) for t in state_steps):
          raise RuntimeError(
              "API has changed, `state_steps` argument must contain a list of"
              + " singleton tensors"
          )
  
      if foreach is None:
          foreach = True
      if foreach and not torch.jit.is_scripting():
          func = _multi_tensor_nadamw
      else:
          func = _single_tensor_nadamw
  
      func(
          params,
          grads,
          exp_avgs,
          exp_avg_sqs,
          state_steps,
          beta1=beta1,
          beta2=beta2,
          lr=lr,
          weight_decay=weight_decay,
          eps=eps,
          maximize=maximize,
          capturable=capturable,
      )
  
file_path: pytorch-image-models/timm/optim/nadamw.py
imports: import math
  from typing import List, Optional
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: nadamw(params, grads, exp_avgs, exp_avg_sqs, state_steps, foreach, capturable) without return types