aclmdlGetOutputNameByIndex
Description
Obtains the output operator name, operator output edge index, top name, or output name of a model output based on the model description.
Prototype
const char *aclmdlGetOutputNameByIndex(const aclmdlDesc *modelDesc, size_t index)
Parameters
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
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.
- Caffe network
- TensorFlow network
- When the ATC tool is used to build an OM model, the return value format is as follows. The items are separated by colons (:).
output operator name:operator output edge index
- When the Ascend Graph APIs are used to build an OM model, the return value format is as follows. The items are separated by underscores (_).
output_network output index_output operator name_operator output edge index
- When the ATC tool is used to build an OM model, the return value format is as follows. The items are separated by colons (:).
- ONNX network
- When a model is being built, if no output node name (node_name) or output name (name of the output) is specified, or only the output name is specified, the return value format is as follows. The items are separated by colons (:).
output operator name:operator output edge index:output name
- When a model is being built, if the output node name (node_name) is specified:The output operator name may be the name of the operator after graph fusion or the name of the subgraph.
- When the ATC tool is used to build an OM model, the return value format is as follows. The items are separated by colons (:).
output operator name:operator output edge index
- When the Ascend Graph APIs are used to build an OM model, the return value format is as follows. The items are separated by underscores (_).
output_network output index_output operator name_operator output edge index
- When the ATC tool is used to build an OM model, the return value format is as follows. The items are separated by colons (:).
- If both the output node name (node_name) and output name (name of the output) are specified, the API returns an error.
- When a model is being built, if no output node name (node_name) or output name (name of the output) is specified, or only the output name is specified, the return value format is as follows. The items are separated by colons (:).
Parent topic: aclmdlDesc