MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / new_tf_operations

Function new_tf_operations

tensorflow/python/framework/c_api_util.py:210–227  ·  view source on GitHub ↗

Generator that yields newly-added TF_Operations in `graph`. Specifically, yields TF_Operations that don't have associated Operations in `graph`. This is useful for processing nodes added by the C API. Args: graph: Graph Yields: wrapped TF_Operation

(graph)

Source from the content-addressed store, hash-verified

208
209
210def new_tf_operations(graph):
211 """Generator that yields newly-added TF_Operations in `graph`.
212
213 Specifically, yields TF_Operations that don't have associated Operations in
214 `graph`. This is useful for processing nodes added by the C API.
215
216 Args:
217 graph: Graph
218
219 Yields:
220 wrapped TF_Operation
221 """
222 # TODO(b/69679162): do this more efficiently
223 for c_op in tf_operations(graph):
224 try:
225 graph._get_operation_by_tf_operation(c_op) # pylint: disable=protected-access
226 except KeyError:
227 yield c_op

Callers

nothing calls this directly

Calls 2

tf_operationsFunction · 0.85

Tested by

no test coverage detected