# tf.compat.v2.keras.initializers.Zeros

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/init_ops_v2.py#L93-L98) |

Initializer that generates tensors initialized to 0.

Inherits From: [`Initializer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/compat/v2/keras/initializers/Initializer)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

\`tf.compat.v2.initializers.Zeros\`, \`tf.compat.v2.initializers.zeros\`, \`tf.compat.v2.keras.initializers.zeros\`, \`tf.compat.v2.zeros_initializer\`

<br />

## Methods

### `from_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/init_ops_v2.py#L69-L89)

    @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. It will typically be the output of `get_config`. |

<br />

<br />

<br />

<br />

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

<br />

### `get_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/init_ops_v2.py#L61-L67)

    get_config()

Returns the configuration of the initializer as a JSON-serializable dict.

<br />

<br />

<br />

| Returns ||
|---|---|
| A JSON-serializable Python dict. ||

<br />

### `__call__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/init_ops_v2.py#L96-L98)

    __call__(
        shape, dtype=tf.dtypes.float32
    )

Returns a tensor object initialized as specified by the initializer.

<br />

<br />

<br />

| Args ||
|---|---|
| `shape` | Shape of the tensor. |
| `dtype` | Optional dtype of the tensor. If not provided will return tensor of [`tf.float32`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf#float32). |

<br />