Baremetal-NN
Baremetal-NN API documentation
Loading...
Searching...
No Matches

◆ NN_init_tensor()

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.

Parameters
ndimnumber of dimensions
shapeshape of tensor
dtypedata type
datapointer to data, if NULL, the data will be allocated