Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfl.pwl_calibration_lib.convert_all_constraints

View source on GitHub

Converts parameters of PWL calibration layer to internal format.

tfl.pwl_calibration_lib.convert_all_constraints(
    output_min, output_max, clamp_min, clamp_max
)

Args:

  • output_min: None for unconstrained bound or some numeric value.
  • output_max: None for unconstrained bound or some numeric value.
  • clamp_min: Whether to clamp pwl calibrator to value if output_min is not None.
  • clamp_max: Whether to clamp pwl calibrator to value if output_max is not None.

Returns:

"value" as float and appropriate value of tfl.pwl_calibration_lib.BoundConstraintsType enum which corresponds to output_min(max) and clamp_min(max).