Baremetal-NN
Baremetal-NN API documentation
Loading...
Searching...
No Matches
tensor_creation.h
Go to the documentation of this file.
1#ifndef __NN_TENSOR_CREATION
2#define __NN_TENSOR_CREATION
3
4#include <stddef.h>
5#include <stdint.h>
6#include <stdlib.h>
7#include <stdio.h>
8#include <assert.h>
9#include <string.h>
10
11#include "tensor.h"
12#include "fill.h"
13
14
25void NN_init_tensor(Tensor *tensor, const size_t ndim, const size_t *shape, DataType dtype, void *data);
26
36Tensor *NN_tensor(size_t ndim, const size_t *shape, DataType dtype, void *data);
37
46Tensor *NN_zeros(size_t ndim, const size_t *shape, DataType dtype);
47
56Tensor *NN_ones(size_t ndim, const size_t *shape, DataType dtype);
57
71Tensor *NN_rand(size_t ndim, const size_t *shape, DataType dtype);
72
83Tensor *NN_arange(size_t ndim, const size_t *shape, DataType dtype, float start, float step);
84
85
86#endif // __NN_TENSOR_CREATION
Definition: tensor.h:36
DataType
Definition: tensor.h:21
void NN_init_tensor(Tensor *tensor, const size_t ndim, const size_t *shape, DataType dtype, void *data)
Tensor * NN_arange(size_t ndim, const size_t *shape, DataType dtype, float start, float step)
Tensor * NN_ones(size_t ndim, const size_t *shape, DataType dtype)
Tensor * NN_zeros(size_t ndim, const size_t *shape, DataType dtype)
Tensor * NN_tensor(size_t ndim, const size_t *shape, DataType dtype, void *data)
Tensor * NN_rand(size_t ndim, const size_t *shape, DataType dtype)