tf.contrib.graph_editor.filter_ops()

tf.contrib.graph_editor.filter_ops(ops, positive_filter) Get the ops passing the given filter. Args: ops: an object convertible to a list of tf.Operation. positive_filter: a function deciding where to keep an operation or not. If True, all the operations are returned. Returns: A list of selected tf.Operation. Raises: TypeError: if ops cannot be converted to a list of tf.Operation.

tf.contrib.graph_editor.detach_outputs()

tf.contrib.graph_editor.detach_outputs(sgv, control_outputs=None) Detach the outputa of a subgraph view. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view. Note that sgv is modified in place. control_outputs: a util.ControlOutputs instance or None. If not None the control outputs are also detached. Returns: A tuple (sgv, output_placeholders) where sgv is a new subgraph view of the detached subgraph;

tf.contrib.graph_editor.detach_inputs()

tf.contrib.graph_editor.detach_inputs(sgv, control_inputs=False) Detach the inputs of a subgraph view. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view. Note that sgv is modified in place. control_inputs: if True control_inputs are also detached. Returns: A tuple (sgv, input_placeholders) where sgv is a new subgraph view of the detached subgraph; input_placeholders is a list of the created input pl

tf.contrib.graph_editor.detach_control_outputs()

tf.contrib.graph_editor.detach_control_outputs(sgv, control_outputs) Detach all the external control outputs of the subgraph sgv. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view. control_outputs: a util.ControlOutputs instance.

tf.contrib.graph_editor.detach_control_inputs()

tf.contrib.graph_editor.detach_control_inputs(sgv) Detach all the external control inputs of the subgraph sgv. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view.

tf.contrib.graph_editor.detach()

tf.contrib.graph_editor.detach(sgv, control_inputs=False, control_outputs=None, control_ios=None) Detach both the inputs and the outputs of a subgraph view. Args: sgv: the subgraph view to be detached. This argument is converted to a subgraph using the same rules as the function subgraph.make_view. Note that sgv is modified in place. control_inputs: A boolean indicating whether control inputs are enabled. control_outputs: An instance of util.ControlOutputs or None. If not None, control outp

tf.contrib.graph_editor.copy_with_input_replacements()

tf.contrib.graph_editor.copy_with_input_replacements(sgv, replacement_ts, dst_graph=None, dst_scope='', src_scope='', reuse_dst_scope=False) Copy a subgraph, replacing some of its inputs. Note a replacement only happens if the tensor to be replaced is an input of the given subgraph. The inputs of a subgraph can be queried using sgv.inputs. Args: sgv: the source subgraph-view. This argument is converted to a subgraph using the same rules as the function subgraph.make_view. replacement_ts: dic

tf.contrib.graph_editor.copy_op_handler()

tf.contrib.graph_editor.copy_op_handler(info, op, copy_shape=True) Copy a tf.Operation. Args: info: Transform._Info instance. op: the tf.Operation to be copied. copy_shape: also copy the shape of the tensor Returns: A copy of op.

tf.contrib.graph_editor.copy()

tf.contrib.graph_editor.copy(sgv, dst_graph=None, dst_scope='', src_scope='', reuse_dst_scope=False) Copy a subgraph. Args: sgv: the source subgraph-view. This argument is converted to a subgraph using the same rules than the function subgraph.make_view. dst_graph: the destination graph. dst_scope: the destination scope. src_scope: the source scope. reuse_dst_scope: if True the dst_scope is re-used if it already exists. Otherwise, the scope is given a unique name based on the one given by

tf.contrib.graph_editor.ControlOutputs.__init__()

tf.contrib.graph_editor.ControlOutputs.__init__(graph) Create a dictionary of control-output dependencies. Args: graph: a tf.Graph. Returns: A dictionary where a key is a tf.Operation instance and the corresponding value is a list of all the ops which have the key as one of their control-input dependencies. Raises: TypeError: graph is not a tf.Graph.