class_docstr: Implementation of a generic laser attack case.
class_docstr_tok: ["Implementation","of","a","generic","laser","attack","case","."]
docstr: Generate adversarial parameters for given images.
  
  :param x: Images to attack as a tensor (NRGB = (1, ...))
  :param y: Correct classes
  :return: List of tuples of adversarial objects and predicted class.
docstr_tok: ["Generate","adversarial","parameters","for","given","images",".",":","param","x",":","Images","to","attack","as","a","tensor","(","NRGB","=","(","1",",","...",")",")",":","param","y",":","Correct","classes",":","return",":","List","of","tuples","of","adversarial","objects","and","predicted","class","."]
code: def generate_parameters(
      self,
      x: np.ndarray,
      y: Optional[np.ndarray] = None,
  ) -> List[Tuple[Optional[AdversarialObject], Optional[int]]]:
      """
      Generate adversarial parameters for given images.
  
      :param x: Images to attack as a tensor (NRGB = (1, ...))
      :param y: Correct classes
      :return: List of tuples of adversarial objects and predicted class.
      """
      result = []
      for image_index in range(x.shape[0]):
          (
              laser_params,
              adv_class,
          ) = self._generate_params_for_single_input(
              x[image_index], y[image_index] if y is not None else None
          )
          result.append((laser_params, adv_class))
      return result
  
imports: import logging
  from typing import Callable, List, Optional, Tuple, Union, Any
  import numpy
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.laser_attack.algorithms import greedy_search
  from art.attacks.evasion.laser_attack.utils import AdversarialObject, AdvObjectGenerator, DebugInfo, ImageGenerator, Line, wavelength_to_rgb
label_desc: Use image node_id 3 for calling the LaserAttack obj's underlying member method code with example usage: obj.generate_parameters(x, y) and returns: result