# tfl.kronecker_factored_lattice_layer.KFLRandomMonotonicInitializer

<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#L449-L497) |

Initializes a [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice) as random monotonic.

    tfl.kronecker_factored_lattice_layer.KFLRandomMonotonicInitializer(
        monotonicities, init_min=0.5, init_max=1.5, seed=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `monotonicities` | Monotonic dimensions for initialization. Does not need to match `monotonicities` of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice). |
| `init_min` | The lower bound on the range of initialized weights. |
| `init_max` | The upper bound on the range of initialized weights. |
| `seed` | A Python integer. Used to create a random seed for the distribution. |

<br />

## Methods

### `from_config`

    @classmethod
    from_config(
        config
    )

Instantiates an initializer from a configuration dictionary.

#### Example:

    initializer = RandomUniform(-1, 1)
    config = initializer.get_config()
    initializer = RandomUniform.from_config(config)

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| An `Initializer` instance. ||

<br />

### `get_config`

[View source](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/kronecker_factored_lattice_layer.py#L489-L497)

    get_config()

Standard Keras config for serializaion.

### `__call__`

[View source](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/kronecker_factored_lattice_layer.py#L469-L487)

    __call__(
        shape, scale, dtype=None, **kwargs
    )

Returns weights of [`tfl.layers.KroneckerFactoredLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/layers/KroneckerFactoredLattice) layer.

<br />

<br />

<br />

| Args ||
|---|---|
| `shape` | Must be: `(1, lattice_sizes, units * dims, num_terms)`. |
| `scale` | Scale variable of shape: `(units, num_terms)`. |
| `dtype` | Standard Keras initializer param. |
| `**kwargs` | Other args passed to [`keras.initializers.Initializer`](https://www.tensorflow.org/api_docs/python/tf/keras/Initializer) **call** method. |

<br />