docstr: params : needs to be detailed
docstr_tok: ["params",":","needs","to","be","detailed"]
code: def __init__(
      self,
      classifier: nn.Module,
      image: torch.Tensor,
      label: int = 0,
      targeted: bool = False,
      epsilon: float = 0.05,
  ) -> None:
      # TODO add crossover params in args + criterion
      """
      params : needs to be detailed
      """
      self.targeted = targeted
      self.epsilon = epsilon
      self.image = (
          image  # if (image is not None) else torch.rand((3, 224, 224))
      )
      self.label = torch.Tensor(
          [label]
      )  # if (label is not None) else torch.Tensor([0])
      self.label = self.label.long()
      self.classifier = (
          classifier  # if (classifier is not None) else Classifier()
      )
      self.classifier.eval()
      self.criterion = nn.CrossEntropyLoss()
      self.imsize = self.image.shape[1]
  
      array = ng.p.Array(
          init=np.zeros(self.image.shape),
          mutable_sigma=True,
      ).set_name("")
      array.set_mutation(sigma=self.epsilon / 10)
      array.set_bounds(
          lower=-self.epsilon,
          upper=self.epsilon,
          method="clipping",
          full_range_sampling=True,
      )
      max_size = ng.p.Scalar(lower=1, upper=200).set_integer_casting()
      array = ng.p.mutation.Crossover(axis=(1, 2), max_size=max_size)(
          array
      )
      super().__init__(self._loss, array)
      self._descriptors.pop("label")
  
imports: import os
  import itertools
  from pathlib import Path
  import cv2
  import numpy
  import PIL.Image
  import torch.nn
  import torch
  import torchvision
  from torchvision.models import resnet50
  import torchvision.transforms
  import nevergrad
  import nevergrad.common.typing
  from nevergrad.common import errors
  from ..None import base
  from .None import imagelosses
label_desc: Use image node_id 1 to create a new ImageAdversarial object from inherited base classes: base with example: obj = ImageAdversarial(classifier, image, label, targeted, epsilon)