# tf.keras.mixed_precision.experimental.get_layer_policy

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.7.0/keras/mixed_precision/get_layer_policy.py#L25-L41) |

Returns the dtype policy of a layer.

    tf.keras.mixed_precision.experimental.get_layer_policy(
        layer
    )

> [!WARNING]
> **Warning:** This function is deprecated. Use [`tf.keras.layers.Layer.dtype_policy`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/keras/layers/Layer#dtype_policy) instead.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `layer` | A [`tf.keras.layers.Layer`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/keras/layers/Layer). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The [`tf.keras.mixed_precision.Policy`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/keras/mixed_precision/Policy) of the layer. ||

<br />