[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.keras.backend.learning_phase_scope\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/keras/backend/learning_phase_scope) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/keras/backend.py#L462-L486) |\n\nProvides a scope within which the learning phase is equal to `value`. (deprecated)\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.learning_phase_scope`](/api_docs/python/tf/keras/backend/learning_phase_scope)\n\n\u003cbr /\u003e\n\n @tf_contextlib.contextmanager\n tf.keras.backend.learning_phase_scope(\n value\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed after 2020-10-11. Instructions for updating: Simply pass a True/False value to the `training` argument of the `__call__` method of your layer or model.\n\nThe learning phase gets restored to its original value upon exiting the scope.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments --------- ||\n|---------|---------------------------------------------------------------------|\n| `value` | Learning phase value, either 0 or 1 (integers). 0 = test, 1 = train |\n\n\u003cbr /\u003e\n\n#### Yields:\n\nNone.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|------------------------------------|\n| `ValueError` | if `value` is neither `0` nor `1`. |\n\n\u003cbr /\u003e"]]