class_docstr: The black-box zeroth-order optimization attack from Pin-Yu Chen et al. (2018). This attack is a variant of the
  C&W attack which uses ADAM coordinate descent to perform numerical estimation of gradients.
  
  | Paper link: https://arxiv.org/abs/1708.03999
class_docstr_tok: ["The","black-box","zeroth-order","optimization","attack","from","Pin-Yu","Chen","et","al",".","(","2018",")",".","This","attack","is","a","variant","of","the","C","&","W","attack","which","uses","ADAM","coordinate","descent","to","perform","numerical","estimation","of","gradients",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1708.03999"]
code: def _reset_adam(
      self, nb_vars: int, indices: Optional[np.ndarray] = None
  ) -> None:
      # If variables are already there and at the right size, reset values
      if self.adam_mean is not None and self.adam_mean.size == nb_vars:
          if indices is None:
              self.adam_mean.fill(0)
              self.adam_var.fill(0)  # type: ignore
              self.adam_epochs.fill(1)  # type: ignore
          else:
              self.adam_mean[indices] = 0
              self.adam_var[indices] = 0  # type: ignore
              self.adam_epochs[indices] = 1  # type: ignore
      else:
          # Allocate Adam variables
          self.adam_mean = np.zeros(nb_vars, dtype=ART_NUMPY_DTYPE)
          self.adam_var = np.zeros(nb_vars, dtype=ART_NUMPY_DTYPE)
          self.adam_epochs = np.ones(nb_vars, dtype=int)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Tuple, Any, TYPE_CHECKING
  import numpy
  from scipy.ndimage import zoom
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import compute_success, get_labels_np_array, check_and_transform_label_format
label_desc: Use image node_id 10 for calling the ZooAttack obj's underlying member method code with example usage: obj._reset_adam(nb_vars, indices) without return types