-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathneuralnetwork.h
49 lines (37 loc) · 1.04 KB
/
neuralnetwork.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
#ifndef _NEURAL_NETWORK_H_
#define _NEURAL_NETWORK_H_
#include <stdint.h>
#include <stdbool.h>
#include "dataset.h"
void nn_process_clear();
void nn_process_config(int16_t *weights_level1, int16_t *weights_level2,
int16_t *constants_recode);
void nn_process_frames(uint8_t *frames, uint32_t *results,
int16_t *constants_recode_level2);
void nn_process_frames_for_demo(int32_t* digit);
void nn_hardware(uint8_t *frames, uint32_t *results,
int16_t *weights_level1,
int16_t *weights_level2,
int16_t *constants_recode_level1,
int16_t *constants_recode_level2);
void nn_software(uint8_t *frames, uint32_t *results,
int16_t *weights_level1,
int16_t *weights_level2,
int16_t *constants_recode_level1,
int16_t *constants_recode_level2);
int64_t cut(int64_t in);
void classify(uint32_t *results, uint32_t *classification);
/*
* Timings
*/
extern double hard_time;
extern double soft_time;
enum level {
LEVEL1,
RECODE1,
LEVEL2,
RECODE2,
LEVEL_NUMBER
};
void nn_config_level(void *weights, enum level level);
#endif /* _NEURAL_NETWORK_H_ */