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

GetDynamicInputDesc

Function Prototype

TensorDesc GetDynamicInputDesc(const string& name, const unsigned int index) const;

Function Description

Obtains the dynamic input TensorDesc of an operator based on the combination of its input name and index.

Parameter Description

Parameter

Input/Output

Type

Description

name

Input

const string&

Dynamic input name of the operator

index

Input

const unsigned int

Dynamic input index of the operator, which starts from 1

Return Value

Parameter

Type

Description

TensorDesc

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