code: def _single_tensor_adadelta(
      params: List[Tensor],
      grads: List[Tensor],
      square_avgs: List[Tensor],
      acc_deltas: List[Tensor],
      *,
      lr: float,
      rho: float,
      eps: float,
      weight_decay: float,
      maximize: bool,
      differentiable: bool,
      has_complex: bool,
  ):
      for param, grad, square_avg, acc_delta in zip(
          params, grads, square_avgs, acc_deltas
      ):
          grad = grad if not maximize else -grad
  
          if weight_decay != 0:
              grad = grad.add(param, alpha=weight_decay)
  
          if torch.is_complex(param):
              square_avg = torch.view_as_real(square_avg)
              acc_delta = torch.view_as_real(acc_delta)
              grad = torch.view_as_real(grad)
  
          square_avg.mul_(rho).addcmul_(grad, grad, value=1 - rho)
          std = square_avg.add(eps).sqrt_()
          delta = acc_delta.add(eps).sqrt_()
          if differentiable:
              delta = delta.clone()
          delta.div_(std).mul_(grad)
          acc_delta.mul_(rho).addcmul_(delta, delta, value=1 - rho)
  
          if torch.is_complex(param):
              delta = torch.view_as_complex(delta)
          param.add_(delta, alpha=-lr)
  
file_path: pytorch/torch/optim/adadelta.py
imports: import torch
  from torch import Tensor
  from .optimizer import Optimizer, _use_grad_for_differentiable, _default_to_fused_or_foreach, _differentiable_doc, _foreach_doc, _maximize_doc, _view_as_real
  from typing import List, Optional
label_desc: Use image node_id 2 for calling a global function with example usage: _single_tensor_adadelta(params, grads, square_avgs, acc_deltas) without return types