code: def rprop(
      params: List[Tensor],
      grads: List[Tensor],
      prevs: List[Tensor],
      step_sizes: List[Tensor],
      # kwonly args with defaults are not supported by functions compiled with torchscript issue #70627
      # setting this as kwarg for now as functional API is compiled by torch/distributed/optim
      foreach: Optional[bool] = None,
      maximize: bool = False,
      differentiable: bool = False,
      has_complex: bool = False,
      *,
      step_size_min: float,
      step_size_max: float,
      etaminus: float,
      etaplus: float,
  ):
      r"""Functional API that performs rprop algorithm computation.
  
      See :class:`~torch.optim.Rprop` for details.
      """
  
      if foreach is None:
          _, foreach = _default_to_fused_or_foreach(
              params, differentiable, use_fused=False
          )
  
      if foreach and torch.jit.is_scripting():
          raise RuntimeError(
              "torch.jit.script not supported with foreach optimizers"
          )
  
      if foreach and not torch.jit.is_scripting():
          func = _multi_tensor_rprop
      else:
          func = _single_tensor_rprop
  
      func(
          params,
          grads,
          prevs,
          step_sizes,
          step_size_min=step_size_min,
          step_size_max=step_size_max,
          etaminus=etaminus,
          etaplus=etaplus,
          maximize=maximize,
          differentiable=differentiable,
          has_complex=has_complex,
      )
  
file_path: pytorch/torch/optim/rprop.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 1 for calling a global function with example usage: rprop(params, grads, prevs, step_sizes, foreach, maximize, differentiable, has_complex) without return types