目录

GetInputDesc

Function Description

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

Function Prototype

APIs taking string arguments will be deprecated in future releases. Use APIs taking non-string arguments instead.

TensorDesc GetInputDesc(const std::string &name) const;
TensorDesc GetInputDescByName(const char_t *name) const;
TensorDesc GetInputDesc(uint32_t index) const;

Parameters

Parameter Input/Output Description
name Input

**Input **name of the operator.

If the input name of the operator does not exist, the default object constructed by TensorDesc is returned. In this case, DataType is set to DT_FLOAT (indicating the float type), and Format is set to FORMAT_NCHW (indicating NCHW).

index Input

Input index of the operator.

If the input index of the operator does not exist, the default object constructed by TensorDesc is returned. In this case, DataType is set to DT_FLOAT (indicating the float type), and Format is set to FORMAT_NCHW (indicating NCHW).

Return Value

Type Description
TensorDesc **TensorDesc **of the operator input.

Exception Handling

None

Restrictions

None