Function: get_desc_from_file
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Obtains model description based on the model file.
Prototype
- C Prototype
1aclError aclmdlGetDescFromFile(aclmdlDesc *modelDesc, const char *modelPath)
- Python Function
1ret = acl.mdl.get_desc_from_file(model_desc, model_path)
Parameter Description
|
Parameter |
Description |
|---|---|
|
model_desc |
Int, pointer to data of the aclmdlDesc type. Call create_desc to create data of the aclmdlDesc type in advance. After the call is successful, the content in the pointer address is updated. |
|
model_path |
Str, directory of an offline model file, including the file name. The user who runs the app must have enough permission to access the directory. The offline model file is an offline model (.om file) adapted to the Ascend AI Processor.
NOTE:
|
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, 0 on success; else, failure. |
Restrictions
The model description obtained using this API cannot be used for the get_op_attr and get_cur_output_dims APIs.