GetInputTensorShape
Function Usage
Obtains the shape information of the corresponding input tensor.
For a dynamic model, the query result of the corresponding dynamic dimension is -1. To pass the query result to the tensor constructor to construct a tensor, convert int64_t data into uint32_t data.
Prototype
std::vector<int64_t> GetInputTensorShape(uint32_t index = 0)
Parameter Description
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Index of the model input (the indexth input) |
Return Parameter Description
Data Structure |
Description |
|---|---|
std::vector<int64_t> |
Shape information of the corresponding input tensor |
Parent topic: Model