|View source on GitHub|
Sets the learning phase to a fixed value. (deprecated)
Compat aliases for migration
See Migration guide for more details.
tf.keras.backend.set_learning_phase( value )
The backend learning phase affects any code that calls
backend.learningphase() In particular, all Keras built-in layers use the learning phase as the default for the
training arg to <a href="../../../tf/keras/layers/Layer#call">
User-written layers and models can achieve the same behavior with code that looks like:
def call(self, inputs, training=None): if training is None: training = backend.learning_phase()
| ||Learning phase value, either 0 or 1 (integers). 0 = test, 1 = train|
| || if |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.