class_docstr: Implementation of the Knockoff Nets attack from Orekondy et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1812.02766
docstr: Create a KnockoffNets attack instance. Note, it is assumed that both the victim classifier and the thieved
  classifier produce logit outputs.
  
  :param classifier: A victim classifier.
  :param batch_size_fit: Size of batches for fitting the thieved classifier.
  :param batch_size_query: Size of batches for querying the victim classifier.
  :param nb_epochs: Number of epochs to use for training.
  :param nb_stolen: Number of queries submitted to the victim classifier to steal it.
  :param sampling_strategy: Sampling strategy, either `random` or `adaptive`.
  :param reward: Reward type, in ['cert', 'div', 'loss', 'all'].
  :param verbose: Show progress bars.
docstr_tok: ["Create","a","KnockoffNets","attack","instance",".","Note",",","it","is","assumed","that","both","the","victim","classifier","and","the","thieved","classifier","produce","logit","outputs",".",":","param","classifier",":","A","victim","classifier",".",":","param","batch_size_fit",":","Size","of","batches","for","fitting","the","thieved","classifier",".",":","param","batch_size_query",":","Size","of","batches","for","querying","the","victim","classifier",".",":","param","nb_epochs",":","Number","of","epochs","to","use","for","training",".",":","param","nb_stolen",":","Number","of","queries","submitted","to","the","victim","classifier","to","steal","it",".",":","param","sampling_strategy",":","Sampling","strategy",",","either","`","random","`","or","`","adaptive","`",".",":","param","reward",":","Reward","type",",","in","[","'cert","'",",","'div","'",",","'loss","'",",","'all","'","]",".",":","param","verbose",":","Show","progress","bars","."]
code: def __init__(
      self,
      classifier: "CLASSIFIER_TYPE",
      batch_size_fit: int = 1,
      batch_size_query: int = 1,
      nb_epochs: int = 10,
      nb_stolen: int = 1,
      sampling_strategy: str = "random",
      reward: str = "all",
      verbose: bool = True,
      use_probability: bool = False,
  ) -> None:
      """
      Create a KnockoffNets attack instance. Note, it is assumed that both the victim classifier and the thieved
      classifier produce logit outputs.
  
      :param classifier: A victim classifier.
      :param batch_size_fit: Size of batches for fitting the thieved classifier.
      :param batch_size_query: Size of batches for querying the victim classifier.
      :param nb_epochs: Number of epochs to use for training.
      :param nb_stolen: Number of queries submitted to the victim classifier to steal it.
      :param sampling_strategy: Sampling strategy, either `random` or `adaptive`.
      :param reward: Reward type, in ['cert', 'div', 'loss', 'all'].
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=classifier)
  
      self.batch_size_fit = batch_size_fit
      self.batch_size_query = batch_size_query
      self.nb_epochs = nb_epochs
      self.nb_stolen = nb_stolen
      self.sampling_strategy = sampling_strategy
      self.reward = reward
      self.verbose = verbose
      self.use_probability = use_probability
      self._check_params()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING, Union
  import numpy
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import ExtractionAttack
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import to_categorical
label_desc: Use image node_id 1 to create a new KnockoffNets object from inherited base classes: ExtractionAttack with example: obj = KnockoffNets(classifier, batch_size_fit, batch_size_query, nb_epochs, nb_stolen, sampling_strategy, reward, verbose, use_probability)