tfl.kronecker_factored_lattice_lib.random_monotonic_initializer

Returns a uniformly random sampled monotonic weight tensor.

  • The uniform random monotonic function will initilaize the lattice parameters uniformly at random and make it such that the parameters are monotonically increasing for each input.
  • The random parameters will be sampled from [0, 1]

shape Shape of weights to initialize. Must be: (1, lattice_sizes, units * dims, num_terms).
monotonicities None or list or tuple of length dims of elements of {0,1} which represents monotonicity constraints per dimension. 1 stands for increasing (non-decreasing in fact), 0 for no monotonicity constraints.
dtype dtype
seed A Python integer. Used to create a random seed for the distribution.

Kronecker-Factored Lattice weights tensor of shape: (1, lattice_sizes, units * dims, num_terms).