class_docstr: This class implements either the Basic Iterative Method
  (Kurakin et al. 2016) when rand_init is set to 0. or the
  Madry et al. (2017) method when rand_minmax is larger than 0.
  Paper link (Kurakin et al. 2016): https://arxiv.org/pdf/1607.02533.pdf
  Paper link (Madry et al. 2017): https://arxiv.org/pdf/1706.06083.pdf
  
  :param model: cleverhans.model.Model
  :param sess: optional tf.Session
  :param dtypestr: dtype of the data
  :param default_rand_init: whether to use random initialization by default
  :param kwargs: passed through to super constructor
class_docstr_tok: ["This","class","implements","either","the","Basic","Iterative","Method","(","Kurakin","et","al",".","2016",")","when","rand_init","is","set","to","0.","or","the","Madry","et","al",".","(","2017",")","method","when","rand_minmax","is","larger","than","0",".","Paper","link","(","Kurakin","et","al",".","2016",")",":","https",":","\/\/arxiv.org\/pdf\/1607.02533.pdf","Paper","link","(","Madry","et","al",".","2017",")",":","https",":","\/\/arxiv.org\/pdf\/1706.06083.pdf",":","param","model",":","cleverhans.model.Model",":","param","sess",":","optional","tf.Session",":","param","dtypestr",":","dtype","of","the","data",":","param","default_rand_init",":","whether","to","use","random","initialization","by","default",":","param","kwargs",":","passed","through","to","super","constructor"]
docstr: Create a ProjectedGradientDescent instance.
  Note: the model parameter should be an instance of the
  cleverhans.model.Model abstraction provided by CleverHans.
docstr_tok: ["Create","a","ProjectedGradientDescent","instance",".","Note",":","the","model","parameter","should","be","an","instance","of","the","cleverhans.model.Model","abstraction","provided","by","CleverHans","."]
code: def __init__(
      self,
      model,
      sess=None,
      dtypestr="float32",
      default_rand_init=True,
      **kwargs,
  ):
      """
      Create a ProjectedGradientDescent instance.
      Note: the model parameter should be an instance of the
      cleverhans.model.Model abstraction provided by CleverHans.
      """
  
      super(ProjectedGradientDescent, self).__init__(
          model, sess=sess, dtypestr=dtypestr, **kwargs
      )
      self.feedable_kwargs = (
          "eps",
          "eps_iter",
          "y",
          "y_target",
          "clip_min",
          "clip_max",
      )
      self.structural_kwargs = [
          "ord",
          "nb_iter",
          "rand_init",
          "clip_grad",
          "sanity_checks",
          "loss_fn",
      ]
      self.default_rand_init = default_rand_init
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans/attacks/projected_gradient_descent.py
imports: import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks.attack import Attack
  from cleverhans.attacks.fast_gradient_method import FastGradientMethod
  from cleverhans import utils_tf
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.utils_tf import clip_eta, random_lp_vector
label_desc: Use image node_id 1 to create a new ProjectedGradientDescent object from inherited base classes: Attack with example: obj = ProjectedGradientDescent(model, sess, dtypestr, default_rand_init)