# tf.keras.mixed_precision.experimental.global_policy

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/mixed_precision/experimental/global_policy) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/mixed_precision/experimental/policy.py#L350-L370) |

Returns the global Policy.

#### View aliases


**Compat aliases for migration**

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

\`tf.compat.v1.keras.mixed_precision.experimental.global_policy\`, \`tf.compat.v2.keras.mixed_precision.experimental.global_policy\`

<br />

    tf.keras.mixed_precision.experimental.global_policy()

The global policy is the default policy used for layers, if no policy is
passed to the layer constructor. If no policy has been set with
[`keras.mixed_precision.experimental.set_policy`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/mixed_precision/experimental/set_policy), this will return a policy
constructed from [`tf.keras.backend.floatx()`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/floatx) in TensorFlow 2, or an "infer"
policy in TensorFlow 1.

See [`keras.mixed_precision.experimental.Policy`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/mixed_precision/experimental/Policy) for more information.

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The global Policy. ||

<br />