tfl.kronecker_factored_lattice_layer.KFLRandomMonotonicInitializer

Initializes a tfl.layers.KroneckerFactoredLattice as random monotonic.

monotonicities Monotonic dimensions for initialization. Does not need to match monotonicities of tfl.layers.KroneckerFactoredLattice.
init_min The lower bound on the range of initialized weights.
init_max The upper bound on the range of initialized weights.
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
An 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).
scale Scale variable of shape: (units, num_terms).
dtype Standard Keras initializer param.
**kwargs Other args passed to keras.initializers.Initializer call method.