tf.keras.backend.learning_phase_scope

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

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

value Learning phase value, either 0 or 1 (integers). 0 = test, 1 = train

Yields:

None.

ValueError if value is neither 0 nor 1.