Function: bundle_get_model_id

Function Usage

Obtains the ID of an executable model.

This API must be used with other APIs to dynamically update variables. For details, see the description in acl.mdl.bundle_load_from_file.

Prototype

  • C Prototype
    1
    aclError aclmdlBundleGetModelId(uint32_t bundleId, size_t index, uint32_t *modelId)
    
  • Python Function
    1
    model_id, ret = acl.mdl.bundle_get_model_id(bundle_id, index)
    

Parameters

Parameter

Description

bundle_id

Int, bundle_id returned after the model is successfully loaded through the acl.mdl.bundle_load_from_file or acl.mdl.bundle_load_from_mem API.

index

Int, index. Must be in the range of [0, Model count – 1]. Call acl.mdl.bundle_get_model_num to obtain the model count.

Returns

Return Value

Description

model_id

Int, ID of an executable model.

ret

Int, error code. 0 indicates success, and other values indicate failure.

Reference

For details about the API call sequence and sample code, see Weight Update.