forked from chemwolf6922/CMSIS_NN_Fast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nn_functions.h
57 lines (49 loc) · 2 KB
/
nn_functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "arm_math.h"
#include "arm_nnfunctions.h"
#include "arm_nnsupportfunctions.h"
void pointwise_conv_basic(const q7_t *Im_in,
const uint16_t dim_im_in,
const uint16_t ch_im_in,
const q7_t *wt,
const uint16_t ch_im_out,
const q7_t *bias,
const uint16_t bias_shift,
const uint16_t out_shift,
q7_t *Im_out,
q15_t *bufferA);
void pointwise_conv_fast(const q7_t *Im_in,
const uint16_t dim_im_in,
const uint16_t ch_im_in,
const q7_t *wt,
const uint16_t ch_im_out,
const q7_t *bias,
const uint16_t bias_shift,
const uint16_t out_shift,
q7_t *Im_out,
q15_t *bufferA);
void conv_HWC(const q7_t *Im_in,
const uint16_t dim_im_in,
const uint16_t ch_im_in,
const q7_t *wt,
const uint16_t ch_im_out,
const uint16_t dim_kernel,
const uint16_t padding,
const q7_t *bias,
const uint16_t bias_shift,
const uint16_t out_shift,
q7_t *Im_out,
q15_t *bufferA,
q15_t *bufferB);
void depthwise_conv(const q7_t *Im_in,
const uint16_t dim_im_in,
const uint16_t ch_im_in,
const q7_t *wt,
const uint16_t dim_kernel,
const uint16_t padding,
const uint16_t out_shift,
q7_t *Im_out,
q7_t *bufferA);
void avg_pool_q7_HWC_opt(q7_t* im_in,
const uint16_t dim_im_in,
const uint16_t ch_im_in,
q7_t* im_out);