tf.contrib.graph_editor.get_forward_walk_ops
Do a forward graph walk and return all the visited ops.
tf.contrib.graph_editor.get_forward_walk_ops(
seed_ops, inclusive=True, within_ops=None, within_ops_fn=None, stop_at_ts=(),
control_outputs=None
)
Args |
seed_ops
|
an iterable of operations from which the forward graph
walk starts. If a list of tensors is given instead, the seed_ops are set
to be the consumers of those tensors.
|
inclusive
|
if True the given seed_ops are also part of the resulting set.
|
within_ops
|
an iterable of tf.Operation within which the search is
restricted. If within_ops is None , the search is performed within
the whole graph.
|
within_ops_fn
|
if provided, a function on ops that should return True iff
the op is within the graph traversal. This can be used along within_ops,
in which case an op is within if it is also in within_ops.
|
stop_at_ts
|
an iterable of tensors at which the graph walk stops.
|
control_outputs
|
a util.ControlOutputs instance or None.
If not None , it will be used while walking the graph forward.
|
Returns |
A Python set of all the tf.Operation ahead of seed_ops .
|
Raises |
TypeError
|
if seed_ops or within_ops cannot be converted to a list of
tf.Operation .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]