Mark layer updates property as deprecated as updates get applied automatically in TF2.

PiperOrigin-RevId: 315433255
Change-Id: I690ec4b15f3dea228a7d26e0bd5332617c0525a2
This commit is contained in:
Pavithra Vijay 2020-06-09 00:19:53 -07:00 committed by TensorFlower Gardener
parent d570632ba8
commit 8398b862ff

View File

@ -1327,10 +1327,13 @@ class Layer(module.Module, version_utils.LayerVersionSelector):
return self.trainable_weights + self.non_trainable_weights
@property
@doc_controls.do_not_doc_inheritable
@deprecation.deprecated(
date=None,
instructions='This property should not be used in TensorFlow 2.0, '
'as updates are applied automatically.')
@doc_controls.do_not_generate_docs
def updates(self):
if (keras_tensor.keras_tensors_enabled()
and ops.executing_eagerly_outside_functions()):
if keras_tensor.keras_tensors_enabled():
return []
collected_updates = []