# tfl.pwl_calibration_lib.convert_all_constraints

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/pwl_calibration_lib.py#L39-L70) |

Converts parameters of PWL calibration layer to internal format.

    tfl.pwl_calibration_lib.convert_all_constraints(
        output_min, output_max, clamp_min, clamp_max
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `output_min` | None for unconstrained bound or some numeric value. |
| `output_max` | None for unconstrained bound or some numeric value. |
| `clamp_min` | Whether to clamp pwl calibrator to value if `output_min` is not None. |
| `clamp_max` | Whether to clamp pwl calibrator to value if `output_max` is not None. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| "value" as float and appropriate value of [`tfl.pwl_calibration_lib.BoundConstraintsType`](https://www.tensorflow.org/lattice/api_docs/python/tfl/pwl_calibration_lib/BoundConstraintsType) enum which corresponds to `output_min(max)` and `clamp_min(max)`. ||

<br />