class_docstr: Implementation of the Knockoff Nets attack from Orekondy et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1812.02766
docstr: Compute reward value.
  
  :param y_output: Output of the victim classifier.
  :param y_hat: Output of the thieved classifier.
  :param n: Current iteration.
  :return: Reward value.
docstr_tok: ["Compute","reward","value",".",":","param","y_output",":","Output","of","the","victim","classifier",".",":","param","y_hat",":","Output","of","the","thieved","classifier",".",":","param","n",":","Current","iteration",".",":","return",":","Reward","value","."]
code: def _reward(
      self, y_output: np.ndarray, y_hat: np.ndarray, n: int
  ) -> Union[float, np.ndarray]:
      """
      Compute reward value.
  
      :param y_output: Output of the victim classifier.
      :param y_hat: Output of the thieved classifier.
      :param n: Current iteration.
      :return: Reward value.
      """
      if self.reward == "cert":
          return self._reward_cert(y_output)
      if self.reward == "div":
          return self._reward_div(y_output, n)
      if self.reward == "loss":
          return self._reward_loss(y_output, y_hat)
      return self._reward_all(y_output, y_hat, n)
  
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 8 for calling the KnockoffNets obj's underlying member method code with example usage: obj._reward(y_output, y_hat, n) and returns: self, self, self, self