openharmony 鸿蒙 capi-neuralnetworkruntime-oh-nn-tensor

2026-08-25 浏览 (1)

OH_NN_Tensor

typedef struct OH_NN_Tensor {...} OH_NN_Tensor

概述

张量结构体。

通常用于构造模型图中的数据节点和算子参数,在构造张量时需要明确数据类型、维数、维度信息和量化信息。

起始版本: 9

废弃版本: 11

替代接口: NN_TensorDesc

相关模块: NeuralNetworkRuntime

所在头文件: neural_network_runtime_type.h

汇总

成员变量

名称描述
OH_NN_DataType dataType指定张量的数据类型,要求从OH_NN_DataType枚举类型中取值。
uint32_t dimensionCount指定张量的维数。
const int32_t *dimensions指定张量的维度信息(形状)。
const OH_NN_QuantParam *quantParam指定张量的量化信息,数据类型要求为OH_NN_QuantParam
OH_NN_TensorType type指定张量的类型。type的取值和张量的用途相关,当张量用作模型的输入或输出,则要求将type设置为OH_NN_TENSOR;当张量用作算子参数,则要求从OH_NN_TensorType中选择除OH_NN_TENSOR以外的枚举值。

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-neuralnetworkruntime-nn-tensor

openharmony 鸿蒙 capi-neuralnetworkruntime-oh-nnexecutor

openharmony 鸿蒙 capi-neuralnetworkruntime-oh-nn-quantparam

openharmony 鸿蒙 capi-neuralnetworkruntime-oh-nn-uint32array

openharmony 鸿蒙 capi-neural-network-runtime-h

openharmony 鸿蒙 Readme-CN

openharmony 鸿蒙 capi-neuralnetworkruntime-nn-quantparam

openharmony 鸿蒙 capi-neuralnetworkruntime-oh-nnmodel

openharmony 鸿蒙 capi-neuralnetworkruntime-nn-tensordesc

openharmony 鸿蒙 capi-neuralnetworkruntime

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/jujT89yR