class_docstr: The Momentum Iterative Method (Dong et al. 2017). This method won
  the first places in NIPS 2017 Non-targeted Adversarial Attacks and
  Targeted Adversarial Attacks. The original paper used hard labels
  for this attack; no label smoothing.
  Paper link: https://arxiv.org/pdf/1710.06081.pdf
  
  :param model: cleverhans.model.Model
  :param sess: optional tf.Session
  :param dtypestr: dtype of the data
  :param kwargs: passed through to super constructor
docstr: Take in a dictionary of parameters and applies attack-specific checks
  before saving them as attributes.
  
  Attack-specific parameters:
  
  :param eps: (optional float) maximum distortion of adversarial example
              compared to original input
  :param eps_iter: (optional float) step size for each attack iteration
  :param nb_iter: (optional int) Number of attack iterations.
  :param y: (optional) A tensor with the true labels.
  :param y_target: (optional) A tensor with the labels to target. Leave
                   y_target=None if y is also set. Labels should be
                   one-hot-encoded.
  :param ord: (optional) Order of the norm (mimics Numpy).
              Possible values: np.inf, 1 or 2.
  :param decay_factor: (optional) Decay factor for the momentum term.
  :param clip_min: (optional float) Minimum input component value
  :param clip_max: (optional float) Maximum input component value
code: def parse_params(
      self,
      eps=0.3,
      eps_iter=0.06,
      nb_iter=10,
      y=None,
      ord=np.inf,
      decay_factor=1.0,
      clip_min=None,
      clip_max=None,
      y_target=None,
      sanity_checks=True,
      **kwargs,
  ):
      """
      Take in a dictionary of parameters and applies attack-specific checks
      before saving them as attributes.
  
      Attack-specific parameters:
  
      :param eps: (optional float) maximum distortion of adversarial example
                  compared to original input
      :param eps_iter: (optional float) step size for each attack iteration
      :param nb_iter: (optional int) Number of attack iterations.
      :param y: (optional) A tensor with the true labels.
      :param y_target: (optional) A tensor with the labels to target. Leave
                       y_target=None if y is also set. Labels should be
                       one-hot-encoded.
      :param ord: (optional) Order of the norm (mimics Numpy).
                  Possible values: np.inf, 1 or 2.
      :param decay_factor: (optional) Decay factor for the momentum term.
      :param clip_min: (optional float) Minimum input component value
      :param clip_max: (optional float) Maximum input component value
      """
  
      # Save attack-specific parameters
      self.eps = eps
      self.eps_iter = eps_iter
      self.nb_iter = nb_iter
      self.y = y
      self.y_target = y_target
      self.ord = ord
      self.decay_factor = decay_factor
      self.clip_min = clip_min
      self.clip_max = clip_max
      self.sanity_checks = sanity_checks
  
      if self.y is not None and self.y_target is not None:
          raise ValueError("Must not set both y and y_target")
      # Check if order of the norm is acceptable given current implementation
      if self.ord not in [np.inf, 1, 2]:
          raise ValueError("Norm order must be either np.inf, 1, or 2.")
  
      if len(kwargs.keys()) > 0:
          warnings.warn(
              "kwargs is unused and will be removed on or after "
              "2019-04-26."
          )
  
      return True
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans/attacks/momentum_iterative_method.py
imports: import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks.attack import Attack
  from cleverhans.attacks.fast_gradient_method import optimize_linear
  from cleverhans.compat import reduce_sum, reduce_mean, softmax_cross_entropy_with_logits
  from cleverhans import utils_tf
label_desc: Use image node_id 3 for calling the MomentumIterativeMethod obj's underlying member method code with example usage: obj.parse_params(eps, eps_iter, nb_iter, y, ord, decay_factor, clip_min, clip_max, y_target, sanity_checks) and returns: True