CreateVariable
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Creates a variable node.
Prototype
1 | EsTensorHolder CreateVariable(int32_t index, const char *name) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Variable node index. |
name |
Input |
Variable node name. If the name of var is the same, the variable node is shared. Therefore, names of variable nodes must be specified explicitly. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
EsTensorHolder |
Created variable tensor holder. If the creation fails, an invalid EsTensorHolder is returned. |
Constraints
None
Examples
1 2 | EsGraphBuilder builder("test_graph"); auto v1 = builder.CreateVariable(0, "var0"); |
Parent topic: EsGraphBuilder