---
title: 函数：bundle_get_model_num
description: "根据bundle_id获取实际可执行的模型数。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclpythondevg_01_1099.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_1099.html
indexId: e4be7ea64543ab2dd8816aaa6b7a3d92684bed1d448cb96c3c3cd51df7805cf975
---
# 函数：bundle_get_model_num

#### 功能说明

根据bundle_id获取实际可执行的模型数。


#### 函数原型

- C函数原型
  1 aclError aclmdlBundleGetModelNum(uint32_t bundleId, size_t modelNum)

- python函数
  1 model_num, ret = acl.mdl.bundle_get_model_num(bundle_id)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| bundle\_id | int，通过acl.mdl.bundle\_load\_from\_file接口或acl.mdl.bundle\_load\_from\_mem接口加载模型成功后返回的bundle\_id。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| model\_num | int，实际可执行的模型数。 |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |
