class_docstr: Normalizes an input by its first singular value.
  
  This module uses power iteration to calculate this value based on the
  input and an internal hidden state.
class_docstr_tok: ["Normalizes","an","input","by","its","first","singular","value",".","This","module","uses","power","iteration","to","calculate","this","value","based","on","the","input","and","an","internal","hidden","state","."]
docstr: Initializes an SpectralNorm module.
  
  Args:
    eps: The constant used for numerical stability.
    n_steps: How many steps of power iteration to perform to approximate the
      singular value of the input.
    name: The name of the module.
docstr_tok: ["Initializes","an","SpectralNorm","module",".","Args",":","eps",":","The","constant","used","for","numerical","stability",".","n_steps",":","How","many","steps","of","power","iteration","to","perform","to","approximate","the","singular","value","of","the","input",".","name",":","The","name","of","the","module","."]
code: def __init__(
      self,
      eps: float = 1e-4,
      n_steps: int = 1,
      name: Optional[str] = None,
  ):
      """Initializes an SpectralNorm module.
  
      Args:
        eps: The constant used for numerical stability.
        n_steps: How many steps of power iteration to perform to approximate the
          singular value of the input.
        name: The name of the module.
      """
      super().__init__(name=name)
      self.eps = eps
      self.n_steps = n_steps
  
imports: import re
  from typing import Optional
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import initializers
  from haiku._src import module
  import jax
  import jax.lax
  import jax.numpy
label_desc: Use image node_id 1 to create a new SpectralNorm object from inherited base classes: hk with example: obj = SpectralNorm(eps, n_steps, name)