tfl.pwl_calibration_lib.canonicalize_monotonicity

View source on GitHub

Converts string constants representing monotonicity into integers.

tfl.pwl_calibration_lib.canonicalize_monotonicity(monotonicity)

Args:

  • monotonicity: monotonicity hyperparameter of PWLCalibration layer.

Raises:

ValueError if monotonicity is invalid.

Returns:

monotonicity represented as -1, 0 or 1.