class_docstr: Attacker class, used to make adversarial examples.
  
  This is primarily an internal class, you probably want to be looking at
  :class:`robustness.attacker.AttackerModel`, which is how models are actually
  served (AttackerModel uses this Attacker class).
  
  However, the :meth:`robustness.Attacker.forward` function below
  documents the arguments supported for adversarial attacks specifically.
class_docstr_tok: ["Attacker","class",",","used","to","make","adversarial","examples",".","This","is","primarily","an","internal","class",",","you","probably","want","to","be","looking","at",":","class",":","`","robustness.attacker.AttackerModel","`",",","which","is","how","models","are","actually","served","(","AttackerModel","uses","this","Attacker","class",")",".","However",",","the",":","meth",":","`","robustness.Attacker.forward","`","function","below","documents","the","arguments","supported","for","adversarial","attacks","specifically","."]
docstr: Initialize the Attacker
  
  Args:
      nn.Module model : the PyTorch model to attack
      Dataset dataset : dataset the model is trained on, only used to get mean and std for normalization
docstr_tok: ["Initialize","the","Attacker","Args",":","nn.Module","model",":","the","PyTorch","model","to","attack","Dataset","dataset",":","dataset","the","model","is","trained","on",",","only","used","to","get","mean","and","std","for","normalization"]
code: def __init__(self, model, dataset):
      """
      Initialize the Attacker
  
      Args:
          nn.Module model : the PyTorch model to attack
          Dataset dataset : dataset the model is trained on, only used to get mean and std for normalization
      """
      super(Attacker, self).__init__()
      self.normalize = helpers.InputNormalize(dataset.mean, dataset.std)
      self.model = model
  
file_path: robustness/robustness/attacker.py
imports: import torch
  import dill
  import os
  from .tools import helpers
  from .None import attack_steps
label_desc: Use image node_id 1 to create a new Attacker object from inherited base classes: ch.nn with example: obj = Attacker(model, dataset)