Attend the Women in ML Symposium on December 7 Register now

tfl.kronecker_factored_lattice_layer.ScaleConstraints

Stay organized with collections Save and categorize content based on your preferences.

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

from_config

Instantiates a weight constraint from a configuration dictionary.

Example:

constraint = UnitNorm()
config = constraint.get_config()
constraint = UnitNorm.from_config(config)

Args
config A Python dictionary, the output of get_config.

Returns
A tf.keras.constraints.Constraint instance.

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.