class_docstr: This class implements gradient attack method, and is the base of FGSM, BIM,
  ILCM, etc.
class_docstr_tok: ["This","class","implements","gradient","attack","method",",","and","is","the","base","of","FGSM",",","BIM",",","ILCM",",","etc","."]
docstr: :param model(model): The model to be attacked.
  :param support_targeted(bool): Does this attack method support targeted.
docstr_tok: [":","param","model","(","model",")",":","The","model","to","be","attacked",".",":","param","support_targeted","(","bool",")",":","Does","this","attack","method","support","targeted","."]
code: def __init__(self, model, support_targeted=True):
      """
      :param model(model): The model to be attacked.
      :param support_targeted(bool): Does this attack method support targeted.
      """
      super(GradientMethodAttack, self).__init__(model)
      self.support_targeted = support_targeted
  
imports: from __future__ import division
  from builtins import range
  import logging
  from collections import Iterable
  import numpy
  from .base import Attack
  from functools import reduce
label_desc: Use image node_id 1 to create a new GradientMethodAttack object from inherited base classes: Attack with example: obj = GradientMethodAttack(model, support_targeted)