From 6dc0f05f84d7a6e03856f9d83fa39d5126052820 Mon Sep 17 00:00:00 2001 From: Rohan Jain Date: Mon, 5 Nov 2018 10:42:43 -0800 Subject: [PATCH] Keeping the init() method on InitializableLookupTableBase intact but adding a deprecation notice instead. PiperOrigin-RevId: 220130488 --- tensorflow/python/ops/lookup_ops.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tensorflow/python/ops/lookup_ops.py b/tensorflow/python/ops/lookup_ops.py index 89109469b7b..e65b53e3ac9 100644 --- a/tensorflow/python/ops/lookup_ops.py +++ b/tensorflow/python/ops/lookup_ops.py @@ -171,6 +171,11 @@ class InitializableLookupTableBase(LookupInterface): def initializer(self): return self._init_op + @property + @deprecated("2018-12-15", "Use `initializer` instead.") + def init(self): + return self.initializer + @property def default_value(self): """The default value of the table.""" @@ -830,6 +835,11 @@ class IdTableWithHashBuckets(LookupInterface): with ops.name_scope(None, "init"): return control_flow_ops.no_op() + @property + @deprecated("2018-12-15", "Use `initializer` instead.") + def init(self): + return self.initializer + @property def resource_handle(self): if self._table is not None: