# tf.keras.initializers.get

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.14.0/keras/initializers/__init__.py#L176-L225) |

Retrieve a Keras initializer by the identifier.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.initializers.get(
        identifier
    )

The `identifier` may be the string name of a initializers function or class
(case-sensitively).

    identifier = 'Ones'
    tf.keras.initializers.deserialize(identifier)
    <...keras.initializers.initializers.Ones...>

You can also specify `config` of the initializer to this function by passing
dict containing `class_name` and `config` as an identifier. Also note that
the `class_name` must map to a `Initializer` class.

    cfg = {'class_name': 'Ones', 'config': {} }
    tf.keras.initializers.deserialize(cfg)
    <...keras.initializers.initializers.Ones...>

In the case that the `identifier` is a class, this method will return a new
instance of the class by its constructor.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `identifier` | String or dict that contains the initializer name or configurations. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Initializer instance base on the input identifier. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If the input identifier is not a supported type or in a bad format. |

<br />