GetInputConstData
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/gnode.h>
- Library file: libgraph.so
Function Usage
Obtains the value of the input Const node.
Returns the value of the const node if the operator input is a Const node. Otherwise, a failure message is returned. Determines whether the input is a Const node and the value of the Const node across subgraphs.
Prototype
1 | graphStatus GetInputConstData(const int32_t index, Tensor &data) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Input port index of the operator. |
data |
Output |
Value of the input Const. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
GRAPH_SUCCESS: success. GRAPH_NODE_WITHOUT_CONST_INPUT: The input is not a Const. Other values: failure. |
Constraints
None
Parent topic: GNode