tf.compat.v1.keras.initializers.Identity

Initializer that generates the identity matrix.

Only use for 2D matrices.

gain Multiplicative factor to apply to the identity matrix.
dtype Default data type, used if no dtype argument is provided when calling the initializer. Only floating point types are supported.

Methods

from_config

View source

Instantiates an initializer from a configuration dictionary.

Example:

initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

Args
config A Python dictionary. It will typically be the output of