class_docstr: Implementation of Randomized Smoothing applied to classifier predictions and gradients, as introduced
  in Cohen et al. (2019).
  
  | Paper link: https://arxiv.org/abs/1902.02918
class_docstr_tok: ["Implementation","of","Randomized","Smoothing","applied","to","classifier","predictions","and","gradients",",","as","introduced","in","Cohen","et","al",".","(","2019",")",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1902.02918"]
docstr: Perform prediction of the given classifier for a batch of inputs, taking an expectation over transformations.
  
  :param x: Input samples.
  :param batch_size: Batch size.
  :param verbose: Display training progress bar.
  :param is_abstain: True if function will abstain from prediction and return 0s. Default: True
  :type is_abstain: `boolean`
  :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
docstr_tok: ["Perform","prediction","of","the","given","classifier","for","a","batch","of","inputs",",","taking","an","expectation","over","transformations",".",":","param","x",":","Input","samples",".",":","param","batch_size",":","Batch","size",".",":","param","verbose",":","Display","training","progress","bar",".",":","param","is_abstain",":","True","if","function","will","abstain","from","prediction","and","return","0s",".","Default",":","True",":","type","is_abstain",":","`","boolean","`",":","return",":","Array","of","predictions","of","shape","`","(","nb_inputs",",","nb_classes",")","`","."]
code: def predict(  # type: ignore
      self,
      x: np.ndarray,
      batch_size: int = 128,
      verbose: bool = False,
      **kwargs,
  ) -> np.ndarray:
      """
      Perform prediction of the given classifier for a batch of inputs, taking an expectation over transformations.
  
      :param x: Input samples.
      :param batch_size: Batch size.
      :param verbose: Display training progress bar.
      :param is_abstain: True if function will abstain from prediction and return 0s. Default: True
      :type is_abstain: `boolean`
      :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
      """
      return RandomizedSmoothingMixin.predict(
          self,
          x,
          batch_size=batch_size,
          verbose=verbose,
          training_mode=False,
          **kwargs,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Tuple, Union, TYPE_CHECKING
  import warnings
  from tqdm.auto import trange
  import numpy
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.certification.randomized_smoothing.randomized_smoothing import RandomizedSmoothingMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 5 for calling the PyTorchRandomizedSmoothing obj's underlying member method code with example usage: obj.predict(x, batch_size, verbose) and returns: RandomizedSmoothingMixin