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

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

See the guide: Graph Editor (contrib) > Module: match

Check if an op is of the given type.


  • 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.

Defined in tensorflow/contrib/graph_editor/