class_docstr: For models that preprocess their inputs by binarizing the
  inputs, this attack can improve adversarials found by other
  attacks. It does this by utilizing information about the
  binarization and mapping values to the corresponding value in
  the clean input or to the right side of the threshold.
  
  Args:
      threshold : The threshold used by the models binarization. If none,
          defaults to (model.bounds()[1] - model.bounds()[0]) / 2.
      included_in : Whether the threshold value itself belongs to the lower or
          upper interval.
class_docstr_tok: ["For","models","that","preprocess","their","inputs","by","binarizing","the","inputs",",","this","attack","can","improve","adversarials","found","by","other","attacks",".","It","does","this","by","utilizing","information","about","the","binarization","and","mapping","values","to","the","corresponding","value","in","the","clean","input","or","to","the","right","side","of","the","threshold",".","Args",":","threshold",":","The","threshold","used","by","the","models","binarization",".","If","none",",","defaults","to","(","model.bounds","(",")","[","1","]","-","model.bounds","(",")","[","0","]",")","\/","2.","included_in",":","Whether","the","threshold","value","itself","belongs","to","the","lower","or","upper","interval","."]
code: def __init__(
      self,
      *,
      distance: Optional[Distance] = None,
      threshold: Optional[float] = None,
      included_in: Union[Literal["lower"], Literal["upper"]] = "upper",
  ):
      super().__init__(distance=distance)
      self.threshold = threshold
      self.included_in = included_in
  
file_path: foolbox/foolbox/attacks/binarization.py
imports: from typing import Union, Optional, Any
  from typing_extensions import Literal
  import eagerpy
  import numpy
  from ..models import Model
  from ..criteria import Criterion
  from ..distances import Distance
  from .base import FlexibleDistanceMinimizationAttack
  from .base import T
  from .base import get_is_adversarial
  from .base import get_criterion
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
label_desc: Use image node_id 1 to create a new BinarizationRefinementAttack object from inherited base classes: FlexibleDistanceMinimizationAttack with example: obj = BinarizationRefinementAttack()