class_docstr: Initializer that generates the identity matrix.
  
  Only usable for generating 2D matrices.
  
  Examples:
  
  >>> # Standalone usage:
  >>> initializer = Identity()
  >>> values = initializer(shape=(2, 2))
  
  >>> # Usage in a Keras layer:
  >>> initializer = Identity()
  >>> layer = Dense(3, kernel_initializer=initializer)
  
  Args:
      gain: Multiplicative factor to apply to the identity matrix.
class_docstr_tok: ["Initializer","that","generates","the","identity","matrix",".","Only","usable","for","generating","2D","matrices",".","Examples",":",">",">",">","#","Standalone","usage",":",">",">",">","initializer","=","Identity","(",")",">",">",">","values","=","initializer","(","shape=","(","2",",","2",")",")",">",">",">","#","Usage","in","a","Keras","layer",":",">",">",">","initializer","=","Identity","(",")",">",">",">","layer","=","Dense","(","3",",","kernel_initializer=initializer",")","Args",":","gain",":","Multiplicative","factor","to","apply","to","the","identity","matrix","."]
docstr: Returns a tensor object initialized as specified by the initializer.
  
  Args:
      shape: Shape of the tensor.
      dtype: Optional dtype of the tensor. Only numeric or boolean dtypes
          are supported. If not specified, `keras.backend.floatx()`
          is used, which default to `float32` unless you configured it
          otherwise (via `keras.backend.set_floatx(float_dtype)`).
docstr_tok: ["Returns","a","tensor","object","initialized","as","specified","by","the","initializer",".","Args",":","shape",":","Shape","of","the","tensor",".","dtype",":","Optional","dtype","of","the","tensor",".","Only","numeric","or","boolean","dtypes","are","supported",".","If","not","specified",",","`","keras.backend.floatx","(",")","`","is","used",",","which","default","to","`","float32","`","unless","you","configured","it","otherwise","(","via","`","keras.backend.set_floatx","(","float_dtype",")","`",")","."]
code: def __call__(self, shape, dtype=None):
      """Returns a tensor object initialized as specified by the initializer.
  
      Args:
          shape: Shape of the tensor.
          dtype: Optional dtype of the tensor. Only numeric or boolean dtypes
              are supported. If not specified, `keras.backend.floatx()`
              is used, which default to `float32` unless you configured it
              otherwise (via `keras.backend.set_floatx(float_dtype)`).
      """
      if len(shape) != 2:
          raise ValueError(
              "Identity matrix initializer can only be used for 2D matrices. "
              f"Received: shape={shape} of rank {len(shape)}."
          )
      dtype = standardize_dtype(dtype)
      return self.gain * ops.eye(*shape, dtype=dtype)
  
imports: from keras import ops
  from keras.api_export import keras_export
  from keras.backend import standardize_dtype
  from keras.initializers.initializer import Initializer
  from keras.saving import serialization_lib
label_desc: Use image node_id 2 for calling the Identity obj's underlying member method code with example usage: obj.__call__(shape, dtype) and returns: unknown