class_docstr: Implementation of the attack from Uyeong Jang et al. (2017).
  
  | Paper link: http://doi.acm.org/10.1145/3134600.3134635
class_docstr_tok: ["Implementation","of","the","attack","from","Uyeong","Jang","et","al",".","(","2017",")",".","|","Paper","link",":","http",":","\/\/doi.acm.org\/10.1145\/3134600.3134635"]
docstr: Function to compute the theta at each step.
  
  :param norm_batch: Norm of a batch.
  :param score: Softmax value at the attacked class.
  :param norm_grad: Norm of gradient values at the attacked class.
  :return: Theta value.
docstr_tok: ["Function","to","compute","the","theta","at","each","step",".",":","param","norm_batch",":","Norm","of","a","batch",".",":","param","score",":","Softmax","value","at","the","attacked","class",".",":","param","norm_grad",":","Norm","of","gradient","values","at","the","attacked","class",".",":","return",":","Theta","value","."]
code: def _compute_theta(
      self,
      norm_batch: np.ndarray,
      score: np.ndarray,
      norm_grad: np.ndarray,
  ) -> np.ndarray:
      """
      Function to compute the theta at each step.
  
      :param norm_batch: Norm of a batch.
      :param score: Softmax value at the attacked class.
      :param norm_grad: Norm of gradient values at the attacked class.
      :return: Theta value.
      """
      equ1 = self.eta * norm_batch * norm_grad
      equ2 = score - 1.0 / self.estimator.nb_classes
      result = np.minimum.reduce([equ1, equ2])
  
      return result
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/newtonfool.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassGradientsMixin
  from art.utils import to_categorical
label_desc: Use image node_id 3 for calling the NewtonFool obj's underlying member method code with example usage: obj._compute_theta(norm_batch, score, norm_grad) and returns: result