Deprecate set_learning_phase()
backend utility.
Deprecating the getter (`learning_phase()`) can't be done at this time because it is used in all core layers. Changing it in the core layers requires changing the default value of the `training` arg in their call methods, which is not a backwards compatible change. PiperOrigin-RevId: 311031244 Change-Id: Ic956a502a83e8bd3f98834ec39c1b55920d91779
This commit is contained in:
parent
5aefa24d78
commit
775d6b6497
@ -393,6 +393,9 @@ def _default_learning_phase():
|
||||
False, shape=(), name='keras_learning_phase')
|
||||
|
||||
|
||||
@deprecated('2020-10-11',
|
||||
'Simply pass a True/False value to the `training` argument '
|
||||
'of the `__call__` method of your layer or model.')
|
||||
@keras_export('keras.backend.set_learning_phase')
|
||||
def set_learning_phase(value):
|
||||
"""Sets the learning phase to a fixed value.
|
||||
|
Loading…
Reference in New Issue
Block a user