# tf.zeros_initializer

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/zeros_initializer) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.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/r2.0/api_docs/python/tf/keras/initializers/Initializer)

#### View aliases


**Main aliases**

[`tf.initializers.Zeros`](https://www.tensorflow.org/api_docs/python/tf/keras/initializers/Zeros), [`tf.initializers.zeros`](https://www.tensorflow.org/api_docs/python/tf/keras/initializers/Zeros), [`tf.keras.initializers.Zeros`](https://www.tensorflow.org/api_docs/python/tf/keras/initializers/Zeros), [`tf.keras.initializers.zeros`](https://www.tensorflow.org/api_docs/python/tf/keras/initializers/Zeros)

<br />

## Methods

### `from_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.0.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/v2.0.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/v2.0.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/r2.0/api_docs/python/tf#float32). |

<br />