ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tfl.kronecker_factored_lattice_layer.ScaleConstraints

Constraints for tfl.layers.KroneckerFactoredLattice scale.

Constraints the scale variable to be between [output_min-output_max, output_max-output_min] such that the final output of the layer is within the desired [output_min, output_max] range, assuming bias is properly fixed to be output_min.

output_min Same meaning as corresponding parameter of KroneckerFactoredLattice.
output_max Same meaning as corresponding parameter of KroneckerFactoredLattice.

Methods

get_config

View source

Standard Keras config for serialization.

__call__

View source

Applies constraints to scale.

Args
scale Kronecker-Factored Lattice scale tensor of shape: (units, num_terms).

Returns
Constrained and clipped scale.