---
title: 函数：get_output_index_by_name
description: "| C函数原型 | aclError aclmdlGetOutputIndexByName(const aclmdlDesc \*modelDesc, const char \*name, size\_t \*index) |"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgp/aclpythondevg_01_0199.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgp/aclpythondevg_01_0199.html
indexId: 4d2df0f691935de52486ece88ae571a2908d301b29c5e98bacc38bd054d046b2108
---
# 函数：get_output_index_by_name

| C函数原型 | aclError aclmdlGetOutputIndexByName(const aclmdlDesc \*modelDesc, const char \*name, size\_t \*index) |
| --- | --- |
| Python函数 | index, ret = acl.mdl.get\_output\_index\_by\_name(model\_desc, name) |
| 函数功能 | 根据模型中的输出名称获取对应输出的索引编号。同步接口。 |
| 输入说明 | model\_desc：int，aclmdlDesc类型数据的指针地址。 name：str，指定输入名称。 |
| 返回值说明 | index：int，获取对应输入的索引编号。 ret：int，错误码。 返回0表示成功。 返回其它值表示失败。 |
| 约束说明 | 无 |
