[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.keras.backend.set_floatx\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/keras/backend/set_floatx) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/keras/backend_config.py#L81-L109) |\n\nSets the default float type.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.keras.backend.set_floatx`](/api_docs/python/tf/keras/backend/set_floatx)\n\n\u003cbr /\u003e\n\n tf.keras.backend.set_floatx(\n value\n )\n\n| **Note:** It is not recommended to set this to float16 for training, as this will likely cause numeric stability issues. Instead, mixed precision, which is using a mix of float16 and float32, can be used by calling `tf.keras.mixed_precision.experimental.set_policy('mixed_float16')`. See the [mixed precision\n| guide](https://www.tensorflow.org/guide/keras/mixed_precision) for details.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments --------- ||\n|---------|---------------------------------------------------|\n| `value` | String; `'float16'`, `'float32'`, or `'float64'`. |\n\n\u003cbr /\u003e\n\n#### Example:\n\n\u003e \u003e \u003e tf.keras.backend.floatx()\n\u003e \u003e \u003e 'float32'\n\u003e \u003e \u003e tf.keras.backend.set_floatx('float64')\n\u003e \u003e \u003e tf.keras.backend.floatx()\n\u003e \u003e \u003e 'float64'\n\u003e \u003e \u003e tf.keras.backend.set_floatx('float32')\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|---------------------------|\n| `ValueError` | In case of invalid value. |\n\n\u003cbr /\u003e"]]