tfl.utils.canonicalize_convexity

Converts string constants representing convexity into integers.

convexity The convexity hyperparameter of tfl.layers.PWLCalibration layer.

convexity represented as -1, 0, 1, or None.

ValueError If convexity is not in the set {-1, 0, 1, 'concave', 'none', 'convex'}.