文档管理中心
API参考CANNIR模型构建APIs属性类CreateFrom

CreateFrom

注意

static AttrValue CreateFrom(const std::vector<Buffer>& val);该接口已废弃。

接口定义

收起
自动换行
深色代码主题
复制
  1. static AttrValue CreateFrom(int64_t val);
  2. static AttrValue CreateFrom(float val);
  3. static AttrValue CreateFrom(bool val);
  4. static AttrValue CreateFrom(const std::string& val);
  5. static AttrValue CreateFrom(const TensorPtr& val);
  6. static AttrValue CreateFrom(const NamedAttrs& val);
  7. static AttrValue CreateFrom(const Buffer& val);
  8. static AttrValue CreateFrom(const TensorDesc& val);
  9. static AttrValue CreateFrom(const std::vector<int64_t>& val);
  10. static AttrValue CreateFrom(const std::vector<float>& val);
  11. static AttrValue CreateFrom(const std::vector<bool>& val);
  12. static AttrValue CreateFrom(const std::vector<std::string>& val);
  13. static AttrValue CreateFrom(const std::vector<TensorPtr>& val);
  14. static AttrValue CreateFrom(const std::vector<Buffer>& val);
  15. static AttrValue CreateFrom(const std::vector<TensorDesc>& val);

功能介绍

创建指定模板类型的属性值对象。

参数

展开

名称

输入/输出

类型

描述

val

输入

int64_t或

float或

bool或

const std::string&或

const TensorPtr&或

const NamedAttrs&或

const Buffer&或

const TensorDesc&或

const std::vector<int64_t>&或

const std::vector<float>&或

const std::vector<bool>&或

const std::vector<std::string>&或

const std::vector<TensorPtr>&或

const std::vector<Buffer>&或

const std::vector<TensorDesc>&

创建对象时设置的值。

返回

展开

类型

描述

AttrValue

创建的属性值对象。

在 API参考 中进行搜索
请输入您想要搜索的关键词