# tfl.test_utils.get_linear_lattice_interpolation_fn

<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/test_utils.py#L224-L261) |

Returns function which does lattice interpolation.

    tfl.test_utils.get_linear_lattice_interpolation_fn(
        lattice_sizes, monotonicities, output_min, output_max
    )

Returned function matches lattice_layer.LinearInitializer with corresponding
parameters.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `lattice_sizes` | list or tuple of integers which represents lattice sizes. |
| `monotonicities` | monotonicity constraints. |
| `output_min` | minimum output of linear function. |
| `output_max` | maximum output of linear function. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Function which takes d-dimension point and performs lattice interpolation assuming lattice weights are such that lattice represents linear function with given output_min and output_max. All monotonic dimesions of this linear function cotribute with same weight despite of numer of vertices per dimension. All non monotonic dimensions have weight 0.0. ||

<br />