Baremetal-NN
Baremetal-NN API documentation
|
void NN_init_tensor | ( | Tensor * | tensor, |
const size_t | ndim, | ||
const size_t * | shape, | ||
DataType | dtype, | ||
void * | data | ||
) |
Initialize a given tensor
The memory is initialized in C order, i.e., the last dimension is contiguous.
ndim | number of dimensions |
shape | shape of tensor |
dtype | data type |
data | pointer to data, if NULL, the data will be allocated |