GraphBuilder Constructor
Function Usage
Initializes a GraphBuilder.
Lifecycle description:
- All TensorHolder objects created by the builder maintain a reference to it.
- As long as any of its tensors is still referenced, the builder will not be garbage collected.
- After build_and_reset () is called, the builder enters the built state and cannot be used to create new tensors.
- You need to create a GraphBuilder to build another graph.
Prototype
1 | GraphBuilder(name: Optional[str] = None) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
name |
Input |
Graph name, which is of the string type. If the value is None, the default value is graph. |
Returns
None
Constraints
- If name is not a string or None, TypeError is thrown.
- If the graph builder fails to be created, RuntimeError is thrown.
Parent topic: GraphBuilder