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

GetInputDesc

Function Prototype

TensorDesc GetInputDesc(const string& name) const;

TensorDesc GetInputDesc(uint32_t index) const;

Function Description

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

Parameter Description

Parameter

Input/Output

Type

Description

name

Input

const string&

Input name of the operator

If no operator input name 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).

index

Input

uint32_t

Input index of the operator

If no operator input 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

TensorDesc

TensorDesc of the operator input

Exception Handling

None

Restriction

None