class_docstr: Allows measuring model robustness for a given attack or set of attacks. This class
  can be used with any metric(s) as well as any set of attacks, either based on
  attacks / perturbations from captum.robust such as FGSM or PGD or external
  augmentation methods or perturbations such as torchvision transforms.
code: def _evaluate_batch(
      self,
      input_list: List[Any],
      additional_forward_args: Optional[Tuple],
      key_list: List[str],
      batch_summarizers: Dict[str, Summarizer],
      metric_kwargs: Dict[str, Any],
  ) -> None:
      if additional_forward_args is None:
          additional_forward_args = ()
      if len(input_list) == 1:
          model_out = self.forward_func(
              input_list[0], *additional_forward_args
          )
          out_metric = self.metric(model_out, **metric_kwargs)
          self._update_out_format(out_metric)
          batch_summarizers[key_list[0]].update(out_metric)
      else:
          batched_inps = _reduce_list(input_list)
          model_out = self.forward_func(
              batched_inps, *additional_forward_args
          )
          current_count = 0
          for i in range(len(input_list)):
              batch_size = (
                  input_list[i].shape[0]
                  if isinstance(input_list[i], Tensor)
                  else input_list[i][0].shape[0]
              )
              out_metric = self.metric(
                  model_out[current_count : current_count + batch_size],
                  **metric_kwargs,
              )
              self._update_out_format(out_metric)
              batch_summarizers[key_list[i]].update(out_metric)
              current_count += batch_size
  
imports: import warnings
  from collections import namedtuple
  from typing import Any, Callable, cast, Dict, Generic, List, NamedTuple, Optional, Tuple, TypeVar, Union
  from captum._utils.common import _expand_additional_forward_args, _format_additional_forward_args, _reduce_list
  from captum.attr import Max, Mean, Min, Summarizer
  from captum.log import log_usage
  from captum.robust._core.perturbation import Perturbation
  from torch import Tensor
label_desc: Use image node_id 5 for calling the AttackComparator obj's underlying member method code with example usage: obj._evaluate_batch(input_list, additional_forward_args, key_list, batch_summarizers, metric_kwargs) without return types