tf.contrib.graph_editor.ts()

tf.contrib.graph_editor.ts(*args, **kwargs) Helper to select tensors. Args: *args: list of 1) regular expressions (compiled or not) or 2) (array of) tf.Tensor. tf.Operation instances are silently ignored. **kwargs: 'graph': tf.Graph in which to perform the regex query.This is required when using regex. 'positive_filter': an elem if selected only if positive_filter(elem) is True. This is optional. 'restrict_ts_regex': a regular expression is ignored if it doesn't start with the substring "(?#

tf.contrib.graph_editor.Transformer.__init__()

tf.contrib.graph_editor.Transformer.__init__() Transformer constructor. The following members can be modified: transform_op_handler: handle the transformation of a tf.Operation. This handler defaults to a simple copy. assign_collections_handler: handle the assignment of collections. This handler defaults to assigning new collections created under the given name-scope. transform_external_input_handler: handle the transform of the inputs to the given subgraph. This handler defaults to creating p

tf.contrib.graph_editor.transform_op_in_place()

tf.contrib.graph_editor.transform_op_in_place(info, op, detach_outputs=False) Transform a op in-place - experimental! Transform an operation in place. It reconnects the inputs if they have been modified. if detach_outputs is True, the outputs of op are also detached. Args: info: Transform._Info instance. op: the op to transform in place. detach_outputs: if True, the outputs of op are detached, ready for the user to add more operation. Returns: The transformed op.

tf.contrib.graph_editor.swap_outputs()

tf.contrib.graph_editor.swap_outputs(sgv0, sgv1) Swap all the outputs of sgv0 and sgv1 (see _reroute_outputs).

tf.contrib.graph_editor.swap_ts()

tf.contrib.graph_editor.swap_ts(ts0, ts1, can_modify=None, cannot_modify=None) For each tensor's pair, swap the end of (t0,t1). B0 B1 B0 B1 | | => X A0 A1 A0 A1 Args: ts0: an object convertible to a list of tf.Tensor. ts1: an object convertible to a list of tf.Tensor. can_modify: iterable of operations which can be modified. Any operation outside within_ops will be left untouched by this function. cannot_modify: iterable of operations which cannot be modified. Any operation within canno

tf.contrib.graph_editor.Transformer.new_name()

tf.contrib.graph_editor.Transformer.new_name(name) Compute a destination name from a source name. Args: name: the name to be "transformed". Returns: The transformed name. Raises: ValueError: if the source scope is used (that is, not an empty string) and the source name does not belong to the source scope.

tf.contrib.graph_editor.Transformer

class tf.contrib.graph_editor.Transformer Transform a subgraph into another one. By default, the constructor create a transform which copy a subgraph and replaces inputs with placeholders. This behavior can be modified by changing the handlers.

tf.contrib.graph_editor.swap_inputs()

tf.contrib.graph_editor.swap_inputs(sgv0, sgv1) Swap all the inputs of sgv0 and sgv1 (see reroute_inputs).

tf.contrib.graph_editor.SubGraphView.__str__()

tf.contrib.graph_editor.SubGraphView.__str__()

tf.contrib.graph_editor.swap()

tf.contrib.graph_editor.swap(sgv0, sgv1) Swap the inputs and outputs of sgv1 to sgv0 (see _reroute).