tf.keras.backend.learning_phase_scope
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 |
value
|
Learning phase value, either 0 or 1 (integers).
|
Yields:
None.
Raises |
ValueError
|
if value is neither 0 nor 1 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]