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)
| 317 | |
| 318 | |
| 319 | def 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 | |
| 338 | class ControlOutputs(object): |
nothing calls this directly
no test coverage detected