tfl.pwl_calibration_lib.assert_constraints
Asserts that 'outputs' satisfiy constraints.
tfl.pwl_calibration_lib.assert_constraints(
outputs,
monotonicity,
output_min,
output_max,
clamp_min=False,
clamp_max=False,
debug_tensors=None,
eps=1e-06
)
Args |
outputs
|
Tensor of shape (num_output_values, units) which represents
outputs of pwl calibration layer which will be tested against the given
constraints. If monotonicity is specified these outputs must be for
consequtive inputs.
|
monotonicity
|
One of {-1, 0, 1}. -1 for decreasing, 1 for increasing 0 means
no monotonicity checks.
|
output_min
|
Lower bound or None.
|
output_max
|
Upper bound or None.
|
clamp_min
|
Whether one of outputs must match output_min.
|
clamp_max
|
Whther one of outputs must match output_max.
|
debug_tensors
|
None or list of anything convertible to tensor (for example
tensors or strings) which will be printed in case of constraints
violation.
|
eps
|
Allowed constraints violation.
|
Raises |
ValueError
|
If monotonicity is not one of {-1, 0, 1}
|
Returns |
List of assertion ops in graph mode or immideately asserts in eager mode.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-02 UTC.
[null,null,["Last updated 2024-08-02 UTC."],[],[]]