Module: match

tf.contrib.graph_editor.op_type(op_types, op=None)

Check if an op is of the given type.

Args:
  • op_types: tuple of strings containing the types to check against. For instance: ("Add", "Const")
  • op: the operation to check (or None).
Returns:

if op is not None, return True if the op is of the correct type. if op is None, return a lambda function which does the type checking.


class tf.contrib.graph_editor.OpMatcher

Graph match class.


tf.contrib.graph_editor.OpMatcher.__call__(op) {:#OpMatcher.call}

Evaluate if the op matches or not.


tf.contrib.graph_editor.OpMatcher.__init__(positive_filter) {:#OpMatcher.init}

Graph match constructor.


tf.contrib.graph_editor.OpMatcher.control_input_ops(*args)

Add input matches.


tf.contrib.graph_editor.OpMatcher.input_ops(*args)

Add input matches.


tf.contrib.graph_editor.OpMatcher.output_ops(*args)

Add output matches.