View source on GitHub |
Converts string constants representing convexity into integers.
tfl.utils.canonicalize_convexity(
convexity
)
Args | |
---|---|
convexity
|
The convexity hyperparameter of tfl.layers.PWLCalibration
layer.
|
Returns | |
---|---|
convexity represented as -1, 0, 1, or None. |
Raises | |
---|---|
ValueError
|
If convexity is not in the set {-1, 0, 1, 'concave', 'none', 'convex'}. |