tf.contrib.graph_editor.get_tensors()

tf.contrib.graph_editor.get_tensors(graph) get all the tensors which are input or output of an op in the graph. Args: graph: a tf.Graph. Returns: A list of tf.Tensor. Raises: TypeError: if graph is not a tf.Graph.

tf.contrib.graph_editor.get_ops_ios()

tf.contrib.graph_editor.get_ops_ios(ops, control_inputs=False, control_outputs=None, control_ios=None) Return all the tf.Operation which are connected to an op in ops. Args: ops: an object convertible to a list of tf.Operation. control_inputs: A boolean indicating whether control inputs are enabled. control_outputs: An instance of util.ControlOutputs or None. If not None, control outputs are enabled. control_ios: An instance of util.ControlOutputs or None. If not None, both control inputs

tf.contrib.graph_editor.get_name_scope_ops()

tf.contrib.graph_editor.get_name_scope_ops(ops, scope) Get all the operations under the given scope path. Args: ops: an object convertible to a list of tf.Operation. scope: a scope path. Returns: A list of tf.Operation. Raises: TypeError: if ops cannot be converted to a list of tf.Operation.

tf.contrib.graph_editor.get_generating_ops()

tf.contrib.graph_editor.get_generating_ops(ts) Return all the generating ops of the tensors in ts. Args: ts: a list of tf.Tensor Returns: A list of all the generating tf.Operation of the tensors in ts. Raises: TypeError: if ts cannot be converted to a list of tf.Tensor.

tf.contrib.graph_editor.get_forward_walk_ops()

tf.contrib.graph_editor.get_forward_walk_ops(seed_ops, inclusive=True, within_ops=None, stop_at_ts=(), control_outputs=None) Do a forward graph walk and return all the visited ops. 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 whithin which the

tf.contrib.graph_editor.get_backward_walk_ops()

tf.contrib.graph_editor.get_backward_walk_ops(seed_ops, inclusive=True, within_ops=None, stop_at_ts=(), control_inputs=False) 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_ops are also part of the resulting set. within_ops: an iterable of tf.Operation whithin which

tf.contrib.graph_editor.get_consuming_ops()

tf.contrib.graph_editor.get_consuming_ops(ts) 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.

tf.contrib.graph_editor.filter_ts()

tf.contrib.graph_editor.filter_ts(ops, positive_filter) Get all the tensors which are input or output of an op in ops. Args: ops: an object convertible to a list of tf.Operation. positive_filter: a function deciding whether to keep a tensor or not. If True, all the tensors are returned. Returns: A list of tf.Tensor. Raises: TypeError: if ops cannot be converted to a list of tf.Operation.

tf.contrib.graph_editor.filter_ops_from_regex()

tf.contrib.graph_editor.filter_ops_from_regex(ops, regex) Get all the operations that match the given regex. Args: ops: an object convertible to a list of tf.Operation. regex: a regular expression matching the operation's name. For example, "^foo(/.*)?$" will match all the operations in the "foo" scope. Returns: A list of tf.Operation. Raises: TypeError: if ops cannot be converted to a list of tf.Operation.

tf.contrib.graph_editor.filter_ts_from_regex()

tf.contrib.graph_editor.filter_ts_from_regex(ops, regex) Get all the tensors linked to ops that match the given regex. Args: ops: an object convertible to a list of tf.Operation. regex: a regular expression matching the tensors' name. For example, "^foo(/.*)?:\d+$" will match all the tensors in the "foo" scope. Returns: A list of tf.Tensor. Raises: TypeError: if ops cannot be converted to a list of tf.Operation.