SetAttrForNode
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/es_tensor_holder.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Sets the private attributes of the node for TensorHolder.
Prototype
1 2 3 | Status SetAttrForNode(const char *attr_name, int64_t value) Status SetAttrForNode(const char *attr_name, const char *value) Status SetAttrForNode(const char *attr_name, bool value) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
attr_name |
Input |
Attribute name. |
value |
Input |
Attribute value. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
Status |
GRAPH_SUCCESS(0): success. Other values: failure. |
Constraints
None
Examples
1 2 3 | auto builder = std::make_unique<ge::EsGraphBuilder>("graph"); auto tensor0 = builder->CreateInput(0); (void) tensor0.SetAttrForNode("node_attr_int64", int64_t(123)); // Set the private attribute of an input node. Specifically, set the attribute name to node_attr_int64 and the attribute value to 123. |
Parent topic: EsTensorHolder