class_docstr: Generic class for attacker steps, under perturbation constraints
  specified by an "origin input" and a perturbation magnitude.
  Must implement project, step, and random_perturb
class_docstr_tok: ["Generic","class","for","attacker","steps",",","under","perturbation","constraints","specified","by","an","``","origin","input","''","and","a","perturbation","magnitude",".","Must","implement","project",",","step",",","and","random_perturb"]
docstr: Given a gradient, make the appropriate step according to the
  perturbation constraint (e.g. dual norm maximization for :math:`\ell_p`
  norms).
  
  Parameters:
      g (ch.tensor): the raw gradient
  
  Returns:
      The new input, a ch.tensor for the next step.
docstr_tok: ["Given","a","gradient",",","make","the","appropriate","step","according","to","the","perturbation","constraint","(","e.g",".","dual","norm","maximization","for",":","math",":","`","\\ell_p","`","norms",")",".","Parameters",":","g","(","ch.tensor",")",":","the","raw","gradient","Returns",":","The","new","input",",","a","ch.tensor","for","the","next","step","."]
code: def step(self, x, g):
      """
      Given a gradient, make the appropriate step according to the
      perturbation constraint (e.g. dual norm maximization for :math:`\ell_p`
      norms).
  
      Parameters:
          g (ch.tensor): the raw gradient
  
      Returns:
          The new input, a ch.tensor for the next step.
      """
      raise NotImplementedError
  
imports: import torch
label_desc: Use image node_id 3 for calling the AttackerStep obj's underlying member method code with example usage: obj.step(x, g) without return types