ConstructFromInputs
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/graph.h>
- Library file: libgraph.so
Function Usage
Generates a graph object based on the operator object constructed by users.
The function is the same as that of SetInputs. SetInputs will be deprecated in future releases. Use this API instead.
Prototype
1 | static GraphPtr ConstructFromInputs(const std::vector<Operator> &inputs, const AscendString &name) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
inputs |
Input |
Operator input of the entire graph. |
name |
Input |
Graph name. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
GraphPtr |
Graph pointer, which returns the newly constructed graph. |
Constraints
None
Examples
1 2 3 | GraphPtr graph; graph = Graph::ConstructFromInputs(inputs, graph_name); graph->SetOutputs(outputs); |
Parent topic: Graph