tf.keras.backend.learning_phase_scope

View source on GitHub

Provides a scope within which the learning phase is equal to value.

@tf_contextlib.contextmanager
tf.keras.backend.learning_phase_scope(
    value
)

The learning phase gets restored to its original value upon exiting the scope.

Arguments:

Yields:

None.

Raises: