SetSize
Function Usage
Sets the memory size of a tensor.
Prototype
1 | void SetSize(const size_t size) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
size |
Input |
Memory size of a tensor, in bytes. |
Returns
None
Constraints
None
Examples
1 2 3 | StorageShape sh({1, 2, 3}, {1, 2, 3}); TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr}; t.SetSize(0U); |
Parent topic: TensorV2