tfl.lattice_lib.canonicalize_unimodalities

View source on GitHub

Converts string constants representing unimodalities into integers.

unimodalities unimodalities hyperparameter of Lattice layer.

ValueError if one of unimodalities is invalid.

unimodalities represented as -1, 0 or 1.