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 _get_prob(
      self, prev_noise: np.ndarray, double: bool = False
  ) -> np.ndarray:
      dims = list(prev_noise.shape)
      channel_index = 1 if self.estimator.channels_first else 3
  
      # Double size if needed
      if double:
          dims = [
              2 * size if i not in [0, channel_index] else size
              for i, size in enumerate(dims)
          ]
  
      prob = np.empty(shape=dims, dtype=np.float32)
      image = np.abs(prev_noise)
  
      for channel in range(prev_noise.shape[channel_index]):
          if not self.estimator.channels_first:
              image_pool = self._max_pooling(
                  image[:, :, :, channel], dims[1] // 8
              )
              if double:
                  prob[:, :, :, channel] = np.abs(
                      zoom(image_pool, [1, 2, 2])
                  )
              else:
                  prob[:, :, :, channel] = image_pool
          elif self.estimator.channels_first:
              image_pool = self._max_pooling(
                  image[:, channel, :, :], dims[2] // 8
              )
              if double:
                  prob[:, channel, :, :] = np.abs(
                      zoom(image_pool, [1, 2, 2])
                  )
              else:
                  prob[:, channel, :, :] = image_pool
  
      prob /= np.sum(prob)
  
      return prob
  
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 12 for calling the ZooAttack obj's underlying member method code with example usage: obj._get_prob(prev_noise, double) and returns: prob