Updated on 2022-03-13 GMT+08:00

GetOutputDesc

Function Prototype

TensorDesc GetOutputDesc(const string& name) const;

TensorDesc GetOutputDesc(uint32_t index) const;

Function Description

Obtains the output TensorDesc of an operator based on its output name or output index.

Parameter Description

Parameter

Input/Output

Type

Description

name

Input

const string&

Output name of the operator

index

Input

uint32_t

Output index of the operator

If no operator output index is available, the default object constructed by TensorDesc is returned. Set DataType to DT_FLOAT (indicating the FLOAT type) and Format to FORMAT_NCHW (indicating the NCHW format).

Return Value

Parameter

Type

Description

-

TensorDesc

If TensorDesc is obtained successfully, the required TensorDesc object is returned. Otherwise, the default TensorDesc object is returned. Set DataType to DT_FLOAT (indicating the FLOAT type) and Format to FORMAT_NCHW (indicating the NCHW format).

Exception Handling

None

Restriction

None