Overview

It is the pattern graph wrapper, which is used to match subgraphs in the target graph. It is usually constructed using create_pattern.

Restrictions

  • __init__(graph) will move the graph from the Python wrapper and invalidate it. Do not use the graph variable after the construction is complete.
  • release() is an internal method of the GE bridge layer and does not need to be directly called by Python pass developers. After patterns() returns a pattern, the framework automatically calls release() to pass the native pattern* to the C++ pipeline.
  • capture_tensor accepts a TensorHolder/Node with an index or a NodeIo object (with the node/index attribute). In this case, the index parameter should be left empty (None).