SetShape
Function Usage
Sets the tensor shape.
Prototype
1 | APP_ERROR Tensor::SetShape(std::vector<uint32_t> shape); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shape |
Input |
Tensor shape. The number of elements represented by shape must be the same as that represented by the original shape of the tensor. Each dimension in the shape vector must be a positive integer. The maximum value of a single dimension and the product of all dimensions cannot exceed 536,870,912 (512 x 1024 x 1024). Otherwise, the function will throw an exception. |
Response Parameters
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |
Parent topic: Tensor