Use ObjectIdentitySet instead of set()
PiperOrigin-RevId: 259070523
This commit is contained in:
parent
3b2bf7e948
commit
6dcc61a0ae
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user