---
title: 函数：get_aipp_type
description: "获取指定模型的指定输入所支持的AIPP类型（动态AIPP或静态AIPP）及动态AIPP输入对应的index值。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclpythondevg_01_0157.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_0157.html
indexId: 1fa36d04d10b0457ae899a1602f0cf5004d7cd8a630101cd721ead8599e4e36f75
---
# 函数：get_aipp_type

#### 功能说明

获取指定模型的指定输入所支持的AIPP类型（动态AIPP或静态AIPP）及动态AIPP输入对应的index值。


#### 函数原型

- C函数原型
  1 aclError aclmdlGetAippType(uint32_t modelId, size_t index, aclmdlInputAippType *type, size_t *dynamicAttachedDataIndex)

- python函数
  1 type, dynamic_attached_data_index, ret = acl.mdl.get_aipp_type(model_id, index)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| model\_id | int，指定模型的ID。 可在以下接口成功加载模型后获取到模型ID。 acl.mdl.load\_from\_file acl.mdl.load\_from\_mem acl.mdl.load\_from\_file\_with\_mem acl.mdl.load\_from\_mem\_with\_mem |
| index | int，模型中输入的index。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| type | int，表示指定模型输入的AIPP类型，具体请参见aclmdlInputAippType。 |
| dynamic\_attached\_data\_index | int，返回信息。 当“type”不为ACL\_DATA\_WITH\_DYNAMIC\_AIPP时，该值返回“0xFFFFFFFF”，表示无效。 当“type”为ACL\_DATA\_WITH\_DYNAMIC\_AIPP时，该值返回动态AIPP输入（用于配置动态AIPP参数）的index。 |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 资源参考

接口调用示例，参见动态AIPP（多个动态AIPP输入）(https://www.hiascend.comdocument/detail/zh/canncommercial/900/programug/acldevg/aclpythondevg_0042.html)。
