tf.contrib.graph_editor.SubGraphView.__init__()

tf.contrib.graph_editor.SubGraphView.__init__(inside_ops=(), passthrough_ts=()) Create a subgraph containing the given ops and the "passthrough" tensors. Args: inside_ops: an object convertible to a list of tf.Operation. This list defines all the operations in the subgraph. passthrough_ts: an object convertible to a list of tf.Tensor. This list define all the "passthrough" tensors. A passthrough tensor is a tensor which goes directly from the input of the subgraph to it output, without any i

tf.contrib.graph_editor.SubGraphView.__str__()

tf.contrib.graph_editor.SubGraphView.__str__()

tf.contrib.graph_editor.SubGraphView.__bool__()

tf.contrib.graph_editor.SubGraphView.__bool__() Allows for implicit boolean conversion.

tf.contrib.graph_editor.SubGraphView.__copy__()

tf.contrib.graph_editor.SubGraphView.__copy__() Create a copy of this subgraph. Note that this class is a "view", copying it only create another view and does not copy the underlying part of the tf.Graph. Returns: A new identical instance of the original subgraph view.

tf.contrib.graph_editor.SubGraphView.__exit__()

tf.contrib.graph_editor.SubGraphView.__exit__(exc_type, exc_value, traceback)

tf.contrib.graph_editor.SubGraphView.__enter__()

tf.contrib.graph_editor.SubGraphView.__enter__() Allow Python context to minize the life time of a subgraph view. A subgraph view is meant to be a lightweight and transient object. A short lifetime will alleviate the "out-of-sync" issue mentioned earlier. For that reason, a SubGraphView instance can be used within a Python context. For example: from tensorflow.contrib import graph_editor as ge with ge.make_sgv(...) as sgv: print(sgv) Returns: Itself.

tf.contrib.graph_editor.SubGraphView.remap_outputs_make_unique()

tf.contrib.graph_editor.SubGraphView.remap_outputs_make_unique() Remap the outputs so that all the tensors appears only once.

tf.contrib.graph_editor.SubGraphView.remap_outputs()

tf.contrib.graph_editor.SubGraphView.remap_outputs(new_output_indices) Remap the output of the subgraph. If the output of the original subgraph are [t0, t1, t2], remapping to [1,1,0] will create a new instance whose outputs is [t1, t1, t0]. Note that this is only modifying the view: the underlying tf.Graph is not affected. Args: new_output_indices: an iterable of integers representing a mapping between the old outputs and the new ones. This mapping can be under-complete and can have repetitio

tf.contrib.graph_editor.SubGraphView.remap_outputs_to_consumers()

tf.contrib.graph_editor.SubGraphView.remap_outputs_to_consumers() Remap the outputs to match the number of consumers.

tf.contrib.graph_editor.SubGraphView.remove_unused_ops()

tf.contrib.graph_editor.SubGraphView.remove_unused_ops(control_inputs=True) Remove unused ops. Args: control_inputs: if True, control inputs are used to detect used ops. Returns: A new subgraph view which only contains used operations.