class_docstr: Sparse L1 Descent Attack [#Tra19]_.
  
  Args:
      rel_stepsize: Stepsize relative to epsilon.
      abs_stepsize: If given, it takes precedence over rel_stepsize.
      steps : Number of update steps.
      random_start : Controls whether to randomly start within allowed epsilon ball.
  
  References:
      .. [#Tra19] Florian Tramèr, Dan Boneh, "Adversarial Training and
      Robustness for Multiple Perturbations"
      https://arxiv.org/abs/1904.13000
class_docstr_tok: ["Sparse","L1","Descent","Attack","[","#","Tra19","]","_.","Args",":","rel_stepsize",":","Stepsize","relative","to","epsilon",".","abs_stepsize",":","If","given",",","it","takes","precedence","over","rel_stepsize",".","steps",":","Number","of","update","steps",".","random_start",":","Controls","whether","to","randomly","start","within","allowed","epsilon","ball",".","References",":","..","[","#","Tra19","]","Florian","Tram\u00e8r",",","Dan","Boneh",",","``","Adversarial","Training","and","Robustness","for","Multiple","Perturbations","''","https",":","\/\/arxiv.org\/abs\/1904.13000"]
code: def __init__(
      self,
      *,
      quantile: float = 0.99,
      rel_stepsize: float = 0.2,
      abs_stepsize: Optional[float] = None,
      steps: int = 10,
      random_start: bool = False,
  ):
      super().__init__(
          rel_stepsize=rel_stepsize,
          abs_stepsize=abs_stepsize,
          steps=steps,
          random_start=random_start,
      )
      if not 0 <= quantile <= 1:
          raise ValueError(
              f"quantile needs to be between 0 and 1, got {quantile}"
          )
      self.quantile = quantile
  
file_path: foolbox/foolbox/attacks/sparse_l1_descent_attack.py
imports: from typing import Optional
  import eagerpy
  import numpy
  from ..devutils import flatten
  from ..devutils import atleast_kd
  from ..types import Bounds
  from .gradient_descent_base import L1BaseGradientDescent
  from .gradient_descent_base import normalize_lp_norms
label_desc: Use image node_id 3 to create a new SparseL1DescentAttack object from inherited base classes: L1BaseGradientDescent with example: obj = SparseL1DescentAttack()