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

Function get_consuming_ops

tensorflow/contrib/graph_editor/util.py:319–335  ·  view source on GitHub ↗

Return all the consuming ops of the tensors in ts. Args: ts: a list of `tf.Tensor` Returns: A list of all the consuming `tf.Operation` of the tensors in `ts`. Raises: TypeError: if ts cannot be converted to a list of `tf.Tensor`.

(ts)

Source from the content-addressed store, hash-verified

317
318
319def get_consuming_ops(ts):
320 """Return all the consuming ops of the tensors in ts.
321
322 Args:
323 ts: a list of `tf.Tensor`
324 Returns:
325 A list of all the consuming `tf.Operation` of the tensors in `ts`.
326 Raises:
327 TypeError: if ts cannot be converted to a list of `tf.Tensor`.
328 """
329 ts = make_list_of_t(ts, allow_graph=False)
330 ops = []
331 for t in ts:
332 for op in t.consumers():
333 if op not in ops:
334 ops.append(op)
335 return ops
336
337
338class ControlOutputs(object):

Callers

nothing calls this directly

Calls 3

make_list_of_tFunction · 0.70
consumersMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected