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

Function get_consuming_ops

tensorflow/python/ops/op_selector.py:178–194  ·  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

176
177
178def get_consuming_ops(ts):
179 """Return all the consuming ops of the tensors in ts.
180
181 Args:
182 ts: a list of `tf.Tensor`
183 Returns:
184 A list of all the consuming `tf.Operation` of the tensors in `ts`.
185 Raises:
186 TypeError: if ts cannot be converted to a list of `tf.Tensor`.
187 """
188 ts = make_list_of_t(ts, allow_graph=False)
189 tops = []
190 for t in ts:
191 for op in t.consumers():
192 if op not in tops:
193 tops.append(op)
194 return tops
195
196
197def make_list_of_op(tops, check_graph=True, allow_graph=True, ignore_ts=False):

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