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

tfl.lattice_lib.canonicalize_monotonicities

View source on GitHub

Converts string constants representing monotonicities into integers.

tfl.lattice_lib.canonicalize_monotonicities(
    monotonicities
)

Args:

  • monotonicities: monotonicities hyperparameter of Lattice layer.

Raises:

ValueError if one of monotonicities is invalid.

Returns:

monotonicities represented as 0 or 1.