tfl.kronecker_factored_lattice_layer.KroneckerFactoredLatticeConstraints

Constraints for tfl.layers.KroneckerFactoredLattice layer.

Applies all constraints to the Kronecker-Factored Lattice weights. See tfl.layers.KroneckerFactoredLattice for more details.

units Same meaning as corresponding parameter of KroneckerFactoredLattice.
scale Scale variable of shape: (units, num_terms).
monotonicities Same meaning as corresponding parameter of KroneckerFactoredLattice.
satisfy_constraints_at_every_step Whether to use approximate projection to ensure that constratins are strictly satisfied.

Methods

get_config

View source

Standard Keras config for serialization.

__call__

View source

Applies constraints to w.

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

Returns
Constrained and projected w.