# tfl.kronecker_factored_lattice_lib.verify_hyperparameters

<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/kronecker_factored_lattice_lib.py#L472-L549) |

Verifies that all given hyperparameters are consistent.

    tfl.kronecker_factored_lattice_lib.verify_hyperparameters(
        lattice_sizes=None,
        units=None,
        num_terms=None,
        input_shape=None,
        monotonicities=None,
        output_min=None,
        output_max=None
    )

This function does not inspect weights themselves. Only their shape. Use
`assert_constraints()` to assert actual weights against constraints.

See [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice) class level comment for detailed
description of arguments.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `lattice_sizes` | Lattice size to check against. |
| `units` | Units hyperparameter of `KroneckerFactoredLattice` layer. |
| `num_terms` | Number of independently trained submodels hyperparameter of `KroneckerFactoredLattice` layer. |
| `input_shape` | Shape of layer input. Useful only if `units` and/or `monotonicities` is set. |
| `monotonicities` | Monotonicities hyperparameter of `KroneckerFactoredLattice` layer. Useful only if `input_shape` is set. |
| `output_min` | Minimum output of `KroneckerFactoredLattice` layer. |
| `output_max` | Maximum output of `KroneckerFactoredLattice` layer. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If lattice_sizes \< 2. |
| `ValueError` | If units \< 1. |
| `ValueError` | If num_terms \< 1. |
| `ValueError` | If len(monotonicities) does not match number of inputs. |

<br />