tfl.categorical_calibration_layer.CategoricalCalibrationConstraints

Monotonicity and bounds constraints for categorical calibration layer.

Updates the weights of CategoricalCalibration layer to satify bound and monotonicity constraints. The update is an approximate L2 projection into the constrained parameter space.

output_min Minimum possible output of categorical function.
output_max Maximum possible output of categorical function.
monotonicities Monotonicities of CategoricalCalibration layer.

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 w.