class_docstr: Implementation of the adversarial patch attack for square and rectangular images and videos in Numpy.
  
  | Paper link: https://arxiv.org/abs/1712.09665
class_docstr_tok: ["Implementation","of","the","adversarial","patch","attack","for","square","and","rectangular","images","and","videos","in","Numpy",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1712.09665"]
docstr: Reset the adversarial patch.
  
  :param initial_patch_value: Patch value to use for resetting the patch.
docstr_tok: ["Reset","the","adversarial","patch",".",":","param","initial_patch_value",":","Patch","value","to","use","for","resetting","the","patch","."]
code: def reset_patch(
      self, initial_patch_value: Optional[Union[float, np.ndarray]]
  ) -> None:
      """
      Reset the adversarial patch.
  
      :param initial_patch_value: Patch value to use for resetting the patch.
      """
      if initial_patch_value is None:
          self.patch = (
              np.ones(shape=self.patch_shape).astype(np.float32)
              * self.mean_value
          )
      elif isinstance(initial_patch_value, float):
          self.patch = (
              np.ones(shape=self.patch_shape).astype(np.float32)
              * initial_patch_value
          )
      elif (
          self.patch is not None
          and self.patch.shape == initial_patch_value.shape
      ):
          self.patch = initial_patch_value
      else:
          raise ValueError("Unexpected value for initial_patch_value.")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  from typing import Optional, Union, Tuple, TYPE_CHECKING
  import random
  import numpy
  from scipy.ndimage import rotate, shift, zoom
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.adversarial_patch.utils import insert_transformed_patch
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 12 for calling the AdversarialPatchNumpy obj's underlying member method code with example usage: obj.reset_patch(initial_patch_value) without return types