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","."]
code: def __init__(self, gain=1.0):
      self.gain = gain
  
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 1 to create a new Identity object from inherited base classes: Initializer with example: obj = Identity(gain)