class_docstr: Initializer that generates the identity matrix.
  
  Constructs a 2D identity matrix or batches of these.
docstr: Constructs an :class:`Identity` initializer.
  
  Args:
    gain: Multiplicative factor to apply to the identity matrix.
docstr_tok: ["Constructs","an",":","class",":","`","Identity","`","initializer",".","Args",":","gain",":","Multiplicative","factor","to","apply","to","the","identity","matrix","."]
code: def __init__(self, gain: Union[float, np.ndarray, jax.Array] = 1.0):
      """Constructs an :class:`Identity` initializer.
  
      Args:
        gain: Multiplicative factor to apply to the identity matrix.
      """
      self.gain = gain
  
imports: from collections.abc import Sequence
  from typing import Any, Union
  from haiku._src import base
  from haiku._src.typing import Initializer
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 to create a new Identity object from inherited base classes: hk.initializers with example: obj = Identity(gain)