tfl.kronecker_factored_lattice_layer.ScaleInitializer

Initializes scale to alternate between 1 and -1 for each term.

Methods

from_config

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, the output of get_config.

Returns
A tf.keras.initializers.Initializer instance.

get_config

Returns the configuration of the initializer as a JSON-serializable dict.

Returns
A JSON-serializable Python dict.

__call__

View source

Returns weights of tfl.layers.KroneckerFactoredLattice scale.

Args
shape Must be: (units, num_terms).
dtype Standard Keras initializer param.
partition_info Standard Keras initializer param. Not used.