TryGetInputDesc
Description
Obtains the input TensorDesc of an operator based on the input name.
Prototype
APIs using strings will be deprecated in later versions. Use APIs supporting non-string data instead.
graphStatus TryGetInputDesc(const std::string &name, TensorDesc &tensor_desc) const
graphStatus TryGetInputDesc(const char_t *name, TensorDesc &tensor_desc) const
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
name |
Input |
Input name of the operator. |
tensor_desc |
Output |
Current format of the operator port, which is a TensorDesc object. |
Returns
graphStatus type. True indicates that the port is available and TensorDesc is successfully obtained. False indicates that the port is unavailable and the output parameter is empty. As a result, TensorDesc fails to be obtained.
Exception Handling
Exception |
Description |
|---|---|
No input corresponding to the name. |
False is returned. |
Restrictions
None