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

tfl.lattice_lib.canonicalize_unimodalities

View source on GitHub

Converts string constants representing unimodalities into integers.

tfl.lattice_lib.canonicalize_unimodalities(
    unimodalities
)

Args:

  • unimodalities: unimodalities hyperparameter of Lattice layer.

Raises:

ValueError if one of unimodalities is invalid.

Returns:

unimodalities represented as -1, 0 or 1.