code: def unit_ball_L_inf(shape, precondition=True):
      """A tensorflow variable tranfomed to be constrained in a L_inf unit ball.
  
      Note that this code also preconditions the gradient to go in the L_inf
      direction of steepest descent.
  
      EXPERIMENTAL: Do not use for adverserial examples if you need to be confident
      they are strong attacks. We are not yet confident in this code.
      """
      x = tf.Variable(tf.zeros(shape))
      if precondition:
          return constrain_L_inf_precondition(x)
      else:
          return constrain_L_inf(x)
  
file_path: lucid/lucid/optvis/param/unit_balls.py
imports: import tensorflow
  from lucid.misc.gradient_override import use_gradient
label_desc: Use image node_id 8 for calling a global function with example usage: unit_ball_L_inf(shape, precondition) and returns: constrain_L_inf_precondition, constrain_L_inf