news 2026/9/10 18:24:42

CANN/GE AttrValue属性值类

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/GE AttrValue属性值类

简介

【免费下载链接】geGE(Graph Engine)是面向昇腾的图编译器和执行器,提供了计算图优化、多流并行、内存复用和模型下沉等技术手段,加速模型执行效率,减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力,并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge

用于存储属性值。

需要包含的头文件

#include <graph/attr_value.h>

Public成员函数

AttrValue() ~AttrValue() = default template<typename T, typename DT> static T CreateFrom(DT &&val) graphStatus GetAttrValue(int64_t &attr_value) const graphStatus GetAttrValue(float32_t &attr_value) const graphStatus GetAttrValue(AscendString &attr_value) const graphStatus GetAttrValue(bool &attr_value) const graphStatus GetAttrValue(Tensor &attr_value) const graphStatus GetAttrValue(std::vector<int64_t> &attr_value) const graphStatus GetAttrValue(std::vector<float32_t> &attr_value) const graphStatus GetAttrValue(std::vector<AscendString> &attr_values) const graphStatus GetAttrValue(std::vector<bool> &attr_value) const graphStatus GetAttrValue(std::vector<Tensor> &attr_value) const graphStatus GetAttrValue(std::vector<std::vector<int64_t>> &attr_value) const graphStatus GetAttrValue(std::vector<ge::DataType> &attr_value) const graphStatus GetAttrValue(ge::DataType &attr_value) const template<typename T, typename DT> graphStatus GetValue(DT &val) const graphStatus GetValue(AscendString &val) graphStatus SetAttrValue(const int64_t &attr_value) const graphStatus SetAttrValue(const float32_t &attr_value) const graphStatus SetAttrValue(const AscendString &attr_value) const graphStatus SetAttrValue(const bool &attr_value) const graphStatus SetAttrValue(const Tensor &attr_value) const graphStatus SetAttrValue(const std::vector<int64_t> &attr_value) const graphStatus SetAttrValue(const std::vector<float32_t> &attr_value) const graphStatus SetAttrValue(const std::vector<AscendString> &attr_values) const graphStatus SetAttrValue(const std::vector<bool> &attr_value) const graphStatus SetAttrValue(const std::vector<Tensor> &attr_value) const graphStatus SetAttrValue(const std::vector<std::vector<int64_t>> &attr_value) const graphStatus SetAttrValue(const std::vector<ge::DataType> &attr_value) const graphStatus SetAttrValue(const ge::DataType &attr_value) const

【免费下载链接】geGE(Graph Engine)是面向昇腾的图编译器和执行器,提供了计算图优化、多流并行、内存复用和模型下沉等技术手段,加速模型执行效率,减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力,并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/9/10 18:21:37

YOLOv5车型识别实战:从模型训练到系统部署全流程

简介&#xff1a;这是基于YOLOv5构建的车型识别系统完整工程包&#xff0c;包含可运行的源码和基于PyQt5开发的图形操作界面。系统支持轿车、SUV、商务车三种车型以及奥迪、宝马、大众、奔驰、丰田五种品牌识别&#xff0c;并集成摄像头实时识别、历史记录保存与识别目标数量统…

作者头像 李华
网站建设 2026/9/10 18:15:57

自定义调色盘组件开发:从色彩模型到企业级应用

1. 为什么需要自定义调色盘组件在数字设计领域&#xff0c;色彩管理一直是个既基础又关键的环节。我见过太多设计师在项目初期花费数小时来回切换Photoshop、Sketch和在线调色工具&#xff0c;只为找到那组"刚刚好"的色值。更糟的是&#xff0c;当企业需要统一多平台…

作者头像 李华
网站建设 2026/9/10 18:15:29

PUMA560关节空间控制:重力补偿PD与逆动力学控制Matlab实现

简介&#xff1a;面向机器人控制领域的研究人员、高年级本科生及自动化工程师&#xff0c;这份基于Matlab实现的PUMA560机械臂控制源码包&#xff0c;专注于解决机械臂关节空间轨迹跟踪中的两类核心控制问题&#xff1a;带重力补偿的PD控制与逆动力学控制。通过实际程序代码和仿…

作者头像 李华
网站建设 2026/9/10 18:14:13

SpringBoot API防刷实战:从限流到行为分析

1. 为什么我们需要API防刷机制 在当今互联网应用中&#xff0c;API接口已经成为系统间通信的核心桥梁。我经历过一个真实的案例&#xff1a;某电商平台的优惠券领取接口在凌晨2点被恶意脚本连续调用&#xff0c;短短15分钟内消耗了价值50万元的优惠券库存。这种场景下&#xff…

作者头像 李华
网站建设 2026/9/10 18:12:03

OpenHarmony上Flutter形状拼图:CustomPaint拖拽交互与适配实践

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

作者头像 李华