Do a backward graph walk and return all the visited ops. Args: seed_ops: an iterable of operations from which the backward graph walk starts. If a list of tensors is given instead, the seed_ops are set to be the generators of those tensors. inclusive: if True the given seed_op
(seed_ops,
inclusive=True,
within_ops=None,
within_ops_fn=None,
stop_at_ts=(),
control_inputs=False)
| 461 | "Please use tensorflow.python.ops.op_selector.get_backward_walk_ops.", |
| 462 | warn_once=True) |
| 463 | def get_backward_walk_ops(seed_ops, |
| 464 | inclusive=True, |
| 465 | within_ops=None, |
| 466 | within_ops_fn=None, |
| 467 | stop_at_ts=(), |
| 468 | control_inputs=False): |
| 469 | """Do a backward graph walk and return all the visited ops. |
| 470 | |
| 471 | Args: |
| 472 | seed_ops: an iterable of operations from which the backward graph |
| 473 | walk starts. If a list of tensors is given instead, the seed_ops are set |
| 474 | to be the generators of those tensors. |
| 475 | inclusive: if True the given seed_ops are also part of the resulting set. |
| 476 | within_ops: an iterable of `tf.Operation` within which the search is |
| 477 | restricted. If `within_ops` is `None`, the search is performed within |
| 478 | the whole graph. |
| 479 | within_ops_fn: if provided, a function on ops that should return True iff |
| 480 | the op is within the graph traversal. This can be used along within_ops, |
| 481 | in which case an op is within if it is also in within_ops. |
| 482 | stop_at_ts: an iterable of tensors at which the graph walk stops. |
| 483 | control_inputs: if True, control inputs will be used while moving backward. |
| 484 | Returns: |
| 485 | A Python set of all the `tf.Operation` behind `seed_ops`. |
| 486 | Raises: |
| 487 | TypeError: if `seed_ops` or `within_ops` cannot be converted to a list of |
| 488 | `tf.Operation`. |
| 489 | """ |
| 490 | return op_selector.get_backward_walk_ops( |
| 491 | seed_ops, |
| 492 | inclusive=inclusive, |
| 493 | within_ops=within_ops, |
| 494 | within_ops_fn=within_ops_fn, |
| 495 | stop_at_ts=stop_at_ts, |
| 496 | control_inputs=control_inputs) |
| 497 | |
| 498 | |
| 499 | def get_walks_intersection_ops(forward_seed_ops, |
no outgoing calls
no test coverage detected