Defines the structure of tensor data.
1 2 3 4 5 | struct BaseTensor { void* buf; std::vector<int> shape; size_t size; } |
Parameter |
Description |
|---|---|
buf |
Tensor data |
shape |
Tensor shape |
size |
Memory size corresponding to the tensor data, in bytes. The size must be the same as the actual memory size. Otherwise, a core dump may occur. |