GetAttr
产品支持情况
头文件/库文件
- 头文件:#include <graph/gnode.h>
- 库文件:libgraph.so
功能说明
获取指定属性名字的值。
函数原型
graphStatus GetAttr(const AscendString &name, int64_t &attr_value) const
graphStatus GetAttr(const AscendString &name, int32_t &attr_value) const
graphStatus GetAttr(const AscendString &name, uint32_t &attr_value) const
graphStatus GetAttr(const AscendString &name, float32_t &attr_value) const
graphStatus GetAttr(const AscendString &name, AscendString &attr_value) const
graphStatus GetAttr(const AscendString &name, bool &attr_value) const
graphStatus GetAttr(const AscendString &name, Tensor &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<int64_t> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<int32_t> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<uint32_t> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<float32_t> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<AscendString> &attr_values) const
graphStatus GetAttr(const AscendString &name, std::vector<bool> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<Tensor> &attr_value) const
graphStatus GetAttr(const AscendString &name, OpBytes &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<std::vector<int64_t>> &attr_value) const
graphStatus GetAttr(const AscendString &name, std::vector<ge::DataType> &attr_value) const
graphStatus GetAttr(const AscendString &name, ge::DataType &attr_value) const
graphStatus GetAttr(const AscendString &name, AttrValue &attr_value) const
参数说明
返回值说明
约束说明
无