openharmony 鸿蒙 capi-format-h

2026-08-25 浏览 (1)

format.h

Overview

Declares tensor data formats.

File to include: <mindspore/format.h>

Library: libmindspore_lite_ndk.so

System capability: SystemCapability.Ai.MindSpore

Since: 9

Related module: MindSpore

Summary

Enums

Nametypedef KeywordDescription
OH_AI_FormatOH_AI_FormatData formats supported by MSTensor.

Enum Description

OH_AI_Format

enum OH_AI_Format

Description

Declares data formats supported by MSTensor.

Since: 9

Enum ItemDescription
OH_AI_FORMAT_NCHW = 0Tensor data is stored in the sequence of batch number N, channel C, height H, and width W.
OH_AI_FORMAT_NHWC = 1Tensor data is stored in the sequence of batch number N, height H, width W, and channel C.
OH_AI_FORMAT_NHWC4 = 2Tensor data is stored in the sequence of batch number N, height H, width W, and channel C. The C axis is 4-byte aligned.
OH_AI_FORMAT_HWKC = 3Tensor data is stored in the sequence of height H, width W, core count K, and channel C.
OH_AI_FORMAT_HWCK = 4Tensor data is stored in the sequence of height H, width W, channel C, and core count K.
OH_AI_FORMAT_KCHW = 5Tensor data is stored in the sequence of core count K, channel C, height H, and width W.
OH_AI_FORMAT_CKHW = 6Tensor data is stored in the sequence of channel C, core count K, height H, and width W.
OH_AI_FORMAT_KHWC = 7Tensor data is stored in the sequence of core count K, height H, width W, and channel C.
OH_AI_FORMAT_CHWK = 8Tensor data is stored in the sequence of channel C, height H, width W, and core count K.
OH_AI_FORMAT_HW = 9Tensor data is stored in the sequence of height H and width W.
OH_AI_FORMAT_HW4 = 10Tensor data is stored in the sequence of height H and width W. The W axis is 4-byte aligned.
OH_AI_FORMAT_NC = 11Tensor data is stored in the sequence of batch number N and channel C.
OH_AI_FORMAT_NC4 = 12Tensor data is stored in the sequence of batch number N and channel C. The C axis is 4-byte aligned.
OH_AI_FORMAT_NC4HW4 = 13Tensor data is stored in the sequence of batch number N, channel C, height H, and width W. The C axis and W axis are 4-byte aligned.
OH_AI_FORMAT_NCDHW = 15Tensor data is stored in the sequence of batch number N, channel C, depth D, height H, and width W.
OH_AI_FORMAT_NWC = 16Tensor data is stored in the sequence of batch number N, width W, and channel C.
OH_AI_FORMAT_NCW = 17Tensor data is stored in the sequence of batch number N, channel C, and width W.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-tensor-h

openharmony 鸿蒙 capi-context-h

openharmony 鸿蒙 capi-mindspore-oh-ai-callbackparam

openharmony 鸿蒙 capi-mindspore-oh-ai-shapeinfo

openharmony 鸿蒙 capi-mindspore-oh-ai-contexthandle

openharmony 鸿蒙 capi-mindspore-oh-ai-traincfghandle

openharmony 鸿蒙 capi-mindspore-oh-ai-allocatorhandle

openharmony 鸿蒙 js-apis-mindSporeLite

openharmony 鸿蒙 capi-mindspore-oh-ai-tensorHandle

openharmony 鸿蒙 Readme-EN

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