---
title: 函数：get_output_format
description: "| C函数原型 | aclFormat aclmdlGetOutputFormat(const aclmdlDesc \\*modelDesc, size\\_t index) |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0195.html"
---

# 函数：get_output_format

| C函数原型 | aclFormat aclmdlGetOutputFormat(const aclmdlDesc \*modelDesc, size\_t index) |
| --- | --- |
| Python函数 | format\_info = acl.mdl.get\_output\_format(model\_desc, index) |
| 函数功能 | 获取模型中指定输出的Format。同步接口。 |
| 输入说明 | model\_desc：int，aclmdlDesc类型数据的指针地址。 index：int，指定获取第几个输入的大小，index值从0开始。 |
| 返回值说明 | format\_info：int，返回指定输入的Format。 \-1：ACL\_FORMAT\_UNDEFINED，未知格式，默认值。 0：ACL\_FORMAT\_NCHW，NCHW格式。 1：ACL\_FORMAT\_NHWC，NHWC格式。 2：ACL\_FORMAT\_ND，表示支持任意格式，仅有Square、Tanh等这些单输入对自身处理的算子外其他需要慎用。 3：ACL\_FORMAT\_NC1HWC0，华为自研的5维数据格式。 4：ACL\_FORMAT\_FRACTAL\_Z，卷积的权重格式。 |
| 约束说明 | 无 |
