# Module: tfl.lattice_layer

<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/lattice_layer.py) |

Lattice layer with monotonicity, unimodality, trust and bound constraints.

Keras implementation of tensorflow lattice layer. This layer takes one or more
d-dimensional input(s) and combines them using a lattice function, satisfying
monotonicity, unimodality, trust and bound constraints if specified.

## Classes

[`class LaplacianRegularizer`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/LaplacianRegularizer): Laplacian regularizer for [`tfl.layers.Lattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/Lattice) layer.

[`class LatticeConstraints`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/LatticeConstraints): Constraints for [`tfl.layers.Lattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/Lattice) layer.

[`class LinearInitializer`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/LinearInitializer): Initializes a [`tfl.layers.Lattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/Lattice) as linear function.

[`class RandomMonotonicInitializer`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/RandomMonotonicInitializer): Initializes a [`tfl.layers.Lattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/Lattice) as uniform random monotonic function.

[`class TorsionRegularizer`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/TorsionRegularizer): Torsion regularizer for [`tfl.layers.Lattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/Lattice) layer.

## Functions

[`create_kernel_initializer(...)`](https://www.tensorflow.org/lattice/api_docs/python/tfl/lattice_layer/create_kernel_initializer): Returns a kernel Keras initializer object from its id.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| LATTICE_KERNEL_NAME | `'lattice_kernel'` |
| LATTICE_SIZES_NAME | `'lattice_sizes'` |
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />