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
1 | std::vector<int64_t> Model::GetInputTensorShape(uint32_t index = 0); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Index of the model input (the indexth input) |
Response Parameters
Data Structure |
Description |
|---|---|
std::vector<int64_t> |
Shape information of the corresponding input tensor. |
Parent topic: Model