tfl.kronecker_factored_lattice_lib.kfl_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 [init_min, init_max]

shape Shape of weights to initialize. Must be: (1, lattice_sizes, units * dims, num_terms).
scale Scale variable of shape: (units, 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.
init_min The lower bound on the range of initialized weights.
init_max The upper bound on the range of initialized weights.
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).