class_docstr: Abstract base class for an attack.
class_docstr_tok: ["Abstract","base","class","for","an","attack","."]
docstr: Performs an attack to the model on the given example (x, y).
  
  Args:
    x: A batched tensor. Input features.
    y: A batched tensor. Input labels.
    model: A callable. The model to be attacked.
    loss: A callable. The loss function.
    random_start: A Boolean. Whether to start the attack from a random point
      inside the epsilon ball.
docstr_tok: ["Performs","an","attack","to","the","model","on","the","given","example","(","x",",","y",")",".","Args",":","x",":","A","batched","tensor",".","Input","features",".","y",":","A","batched","tensor",".","Input","labels",".","model",":","A","callable",".","The","model","to","be","attacked",".","loss",":","A","callable",".","The","loss","function",".","random_start",":","A","Boolean",".","Whether","to","start","the","attack","from","a","random","point","inside","the","epsilon","ball","."]
code: def attack(self, x, y, model, loss, random_start=False):
      """Performs an attack to the model on the given example (x, y).
  
      Args:
        x: A batched tensor. Input features.
        y: A batched tensor. Input labels.
        model: A callable. The model to be attacked.
        loss: A callable. The loss function.
        random_start: A Boolean. Whether to start the attack from a random point
          inside the epsilon ball.
      """
      raise NotImplementedError
  
imports: from absl import logging
  import gin
  import neural_structured_learning
  from multi_representation_adversary.cleverhans_adapter import sparse_l1_descent
  from multi_representation_adversary.cleverhans_adapter import utils_tf
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling the Attack obj's underlying member method code with example usage: obj.attack(x, y, model, loss, random_start) without return types