Graph Constructor

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Usage

Creates a graph object.

Prototype

1
Graph(name: Optional[str] = "graph")

Parameters

Parameter

Input/Output

Description

name

Input

Graph name.

The value is of the string type. The default value is graph.

Returns

Created graph object

Restrictions

  • If name is not a string, TypeError is thrown.
  • If the graph fails to be created, RuntimeError is thrown.

Example

1
graph = Graph("my_graph")