class_docstr: The attack that uses L-BFGS to minimize the distance of the original
  and perturbed images
  
  :param predict: forward pass function.
  :param num_classes: number of clasess.
  :param batch_size: number of samples in the batch
  :param binary_search_steps: number of binary search times to find the
      optimum
  :param max_iterations: the maximum number of iterations
  :param initial_const: initial value of the constant c
  :param clip_min: mininum value per input dimension.
  :param clip_max: maximum value per input dimension.
  :param loss_fn: loss function
  :param targeted: if the attack is targeted.
class_docstr_tok: ["The","attack","that","uses","L-BFGS","to","minimize","the","distance","of","the","original","and","perturbed","images",":","param","predict",":","forward","pass","function",".",":","param","num_classes",":","number","of","clasess",".",":","param","batch_size",":","number","of","samples","in","the","batch",":","param","binary_search_steps",":","number","of","binary","search","times","to","find","the","optimum",":","param","max_iterations",":","the","maximum","number","of","iterations",":","param","initial_const",":","initial","value","of","the","constant","c",":","param","clip_min",":","mininum","value","per","input","dimension",".",":","param","clip_max",":","maximum","value","per","input","dimension",".",":","param","loss_fn",":","loss","function",":","param","targeted",":","if","the","attack","is","targeted","."]
code: def __init__(
      self,
      predict,
      num_classes,
      batch_size=1,
      binary_search_steps=9,
      max_iterations=100,
      initial_const=1e-2,
      clip_min=0,
      clip_max=1,
      loss_fn=None,
      targeted=False,
  ):
      super(LBFGSAttack, self).__init__(
          predict, loss_fn, clip_min, clip_max
      )
      # XXX: should combine the input loss function with other things
      self.num_classes = num_classes
      self.batch_size = batch_size
      self.binary_search_steps = binary_search_steps
      self.max_iterations = max_iterations
      self.initial_const = initial_const
      self.targeted = targeted
  
file_path: advertorch/advertorch/attacks/lbfgs.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import torch
  import torch.nn.functional
  from advertorch.utils import calc_l2distsq
  from .base import Attack
  from .base import LabelMixin
label_desc: Use image node_id 1 to create a new LBFGSAttack object from inherited base classes: Attack, LabelMixin with example: obj = LBFGSAttack(predict, num_classes, batch_size, binary_search_steps, max_iterations, initial_const, clip_min, clip_max, loss_fn, targeted)