# tfl.kronecker_factored_lattice_layer.create_kernel_initializer

<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_layer.py#L362-L415) |

Returns a kernel Keras initializer object from its id.

    tfl.kronecker_factored_lattice_layer.create_kernel_initializer(
        kernel_initializer_id,
        monotonicities,
        output_min,
        output_max,
        init_min=None,
        init_max=None
    )

This function is used to convert the 'kernel_initializer' parameter in the
constructor of tfl.layers.KroneckerFactoredLattice into the corresponding
initializer object.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `kernel_initializer_id` | See the documentation of the 'kernel_initializer' parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice). |
| `monotonicities` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice). |
| `output_min` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice). |
| `output_max` | See the documentation of the same parameter in the constructor of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice). |
| `init_min` | None or lower bound of kernel initialization. If set, init_max must also be set. Ignored if kernel_initializer_id is a Keras object. |
| `init_max` | None or upper bound of kernel initialization. If set, init_min must also be set. Ignored if kernel_initializer_id is a Keras object. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The Keras initializer object for the [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice) kernel variable. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If only one of init_{min/max} is set. |

<br />