aclmdlGetOutputNameByIndex

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

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 (started at 0) of the output whose output operator name, operator output edge index, top name, and 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 modeling method.

  • Caffe
    The format of the return value is as follows, in which items are separated by colons (:). A top name is returned only when the model contains one.
    output operator name:operator output edge index:top name
  • TensorFlow
    • 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 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

      For details about graph APIs, see Graph Mode Development Guide.

  • ONNX
    • 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 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

        For details about graph APIs, see Graph Mode Development Guide.

    • If both the output node name (node_name) and output name (name of the output) are specified, the API returns an error.