tfl.pwl_calibration_layer.PWLCalibrationConstraints

View source on GitHub

Monotonicity and bounds constraints for PWL calibration layer.

Applies an approximate L2 projection to the weights of a PWLCalibration layer such that the result satisfies the specified constraints.

monotonicity Same meaning as corresponding parameter of PWLCalibration.
convexity Same meaning as corresponding parameter of PWLCalibration.
lengths Lengths of pieces of piecewise linear function. Needed only if convexity is specified.
output_min Minimum possible output of pwl function.
output_max Maximum possible output of pwl function.
output_min_constraints A tfl.pwl_calibration_lib.BoundConstraintsType describing the constraints on the layer's minimum value.
output_max_constraints A tfl.pwl_calibration_lib.BoundConstraintsType describing the constraints on the layer's maximum value.
num_projection_iterations Same meaning as corresponding parameter of PWLCalibration.

Methods

get_config

View source

Standard Keras config for serialization.

__call__

View source

Applies constraints to w.