class_docstr: Increases the amount of salt and pepper noise until the input is misclassified.
  
  Args:
      steps : The number of steps to run.
      across_channels : Whether the noise should be the same across all channels.
      channel_axis : The axis across which the noise should be the same
          (if across_channels is True). If None, will be automatically inferred
          from the model if possible.
class_docstr_tok: ["Increases","the","amount","of","salt","and","pepper","noise","until","the","input","is","misclassified",".","Args",":","steps",":","The","number","of","steps","to","run",".","across_channels",":","Whether","the","noise","should","be","the","same","across","all","channels",".","channel_axis",":","The","axis","across","which","the","noise","should","be","the","same","(","if","across_channels","is","True",")",".","If","None",",","will","be","automatically","inferred","from","the","model","if","possible","."]
code: def __init__(
      self,
      steps: int = 1000,
      across_channels: bool = True,
      channel_axis: Optional[int] = None,
  ):
      self.steps = steps
      self.across_channels = across_channels
      self.channel_axis = channel_axis
  
file_path: foolbox/foolbox/attacks/saltandpepper.py
imports: from typing import Optional, Any, Union
  import eagerpy
  from ..criteria import Misclassification
  from ..distances import l2
  from ..devutils import flatten
  from ..devutils import atleast_kd
  from .base import MinimizationAttack
  from .base import get_is_adversarial
  from .base import get_channel_axis
  from ..models.base import Model
  from .base import get_criterion
  from .base import T
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
label_desc: Use image node_id 1 to create a new SaltAndPepperNoiseAttack object from inherited base classes: MinimizationAttack with example: obj = SaltAndPepperNoiseAttack(steps, across_channels, channel_axis)