From 6dcc61a0aef77660354f81db285f028c3cfaf5af Mon Sep 17 00:00:00 2001 From: Gaurav Jain Date: Fri, 19 Jul 2019 17:54:01 -0700 Subject: [PATCH] Use ObjectIdentitySet instead of set() PiperOrigin-RevId: 259070523 --- tensorflow/python/framework/auto_control_deps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/python/framework/auto_control_deps.py b/tensorflow/python/framework/auto_control_deps.py index 2e656857e87..1b45286bfe9 100644 --- a/tensorflow/python/framework/auto_control_deps.py +++ b/tensorflow/python/framework/auto_control_deps.py @@ -27,6 +27,7 @@ from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import control_flow_util from tensorflow.python.ops import tensor_array_ops from tensorflow.python.util import nest +from tensorflow.python.util import object_identity from tensorflow.python.util import tf_decorator # Op types that should not run in program order, e.g. because they need to run @@ -110,7 +111,7 @@ class AutomaticControlDependencies(object): """ def __init__(self): - self._returned_tensors = set() + self._returned_tensors = object_identity.ObjectIdentitySet() self.ops_which_must_run = set() def mark_as_return(self, tensor):