tfl.kronecker_factored_lattice_layer.RandomMonotonicInitializer

Initializes a tfl.layers.KroneckerFactoredLattice as random monotonic.

monotonicities Monotonic dimensions for initialization. Does not need to match monotonicities of tfl.layers.KroneckerFactoredLattice.
seed A Python integer. Used to create a random seed for the distribution.

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

View source

Standard Keras config for serializaion.

__call__

View source

Returns weights of tfl.layers.KroneckerFactoredLattice layer.

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