Obtains the output operator name, operator output edge index, top name, or output name of a model output based on the model description. This API is synchronous.
const char *aclmdlGetOutputNameByIndex(const aclmdlDesc *modelDesc, size_t index)
Parameter |
Input/Output |
Description |
|---|---|---|
modelDesc |
Input |
Pointer to data of the aclmdlDesc type. Call aclmdlCreateDesc to create data of the aclmdlDesc type in advance. |
index |
Input |
Index (starting at 0) of the output whose output operator name, operator output edge index, top name, or output name to obtain. |
Returns the output operator name, operator output edge index, top name, or output name. The format of the return value obtained by calling this API varies according to the original network and model build mode.
output operator name : operator output edge index
output_network output index_output operator name_operator output edge index
The format of the return value is as follows. The items are separated by colons (:).
output operator name : operator output edge index : output name
If the output operator name or the output name in the network model is not specified (the system automatically obtains the output name from the original model) or only the output name in the network model is specified during OM model building, the return value contains the output name.
When the Ascend Graph APIs are used to build an OM model, if the output operator name in the network model is specified, the return value format is as follows. The items are separated by underscores (_).
output_network output index_output operator name_operator output edge index