class_docstr: Attacks using the Neural Structured Learning library.
class_docstr_tok: ["Attacks","using","the","Neural","Structured","Learning","library","."]
docstr: Constructs an Attack object with the NSL library.
  
  Args:
    adv_config: An instance of `nsl.configs.AdvNeighborConfig`.
docstr_tok: ["Constructs","an","Attack","object","with","the","NSL","library",".","Args",":","adv_config",":","An","instance","of","`","nsl.configs.AdvNeighborConfig","`","."]
code: def __init__(self, adv_config):
      """Constructs an Attack object with the NSL library.
  
      Args:
        adv_config: An instance of `nsl.configs.AdvNeighborConfig`.
      """
      self.config = adv_config
      # Handle iterations separately to have the correct random_start behavior.
      self.num_iter = self.config.pgd_iterations
      self.config.pgd_iterations = 1
      logging.info("NSL CONFIG CREATION: %s", self.__dict__)
  
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 to create a new NSLAttack object from inherited base classes: Attack with example: obj = NSLAttack(adv_config)