# tfl.pwl_calibration_layer.NaiveBoundsConstraints

<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_layer.py#L779-L812) |

Naively clips all elements of tensor to be within bounds.

    tfl.pwl_calibration_layer.NaiveBoundsConstraints(
        lower_bound=None, upper_bound=None
    )

This constraint is used only for the weight tensor for missing output value.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `lower_bound` | Lower bound to clip variable values to. |
| `upper_bound` | Upper bound to clip variable values to. |

<br />

## Methods

### `from_config`

    @classmethod
    from_config(
        config
    )

Instantiates a weight constraint from a configuration dictionary.

#### Example:

    constraint = UnitNorm()
    config = constraint.get_config()
    constraint = UnitNorm.from_config(config)

<br />

<br />

<br />

| Args ||
|---|---|
| `config` | A Python dictionary, the output of `get_config`. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A [`tf.keras.constraints.Constraint`](https://www.tensorflow.org/api_docs/python/tf/keras/constraints/Constraint) instance. ||

<br />

### `get_config`

[View source](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/pwl_calibration_layer.py#L807-L812)

    get_config()

Standard Keras config for serialization.

### `__call__`

[View source](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/pwl_calibration_layer.py#L799-L805)

    __call__(
        w
    )

Applies constraints to w.