class_docstr: Attack step for :math:`\ell_\infty` threat model. Given :math:`x_0`
  and :math:`\epsilon`, the constraint set is given by:
  
  .. math:: S = \{x | \|x - x_0\|_\infty \leq \epsilon\}
class_docstr_tok: ["Attack","step","for",":","math",":","`","\\ell_\\infty","`","threat","model",".","Given",":","math",":","`","x_0","`","and",":","math",":","`","\\epsilon","`",",","the","constraint","set","is","given","by",":","..","math",":",":","S","=","\\","{","x","|","\\|x","-","x_0\\|_\\infty","\\leq","\\epsilon\\","}"]
docstr_tok: []
code: def random_perturb(self, x):
      """ """
      new_x = x + 2 * (ch.rand_like(x) - 0.5) * self.eps
      return ch.clamp(new_x, 0, 1)
  
imports: import torch
label_desc: Use image node_id 3 for calling the LinfStep obj's underlying member method code with example usage: obj.random_perturb(x) and returns: ch