-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMlpNetwork.h
43 lines (35 loc) · 938 Bytes
/
MlpNetwork.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
// MlpNetwork.h
#ifndef MLPNETWORK_H
#define MLPNETWORK_H
#include "Dense.h"
#define MLP_SIZE 4
/**
* @struct digit
* @brief Identified (by Mlp network) digit with
* the associated probability.
* @var value - Identified digit value
* @var probability - identification probability
*/
typedef struct digit {
unsigned int value;
float probability;
} digit;
const matrix_dims img_dims = {28, 28};
const matrix_dims weights_dims[] = {{128, 784},
{64, 128},
{20, 64},
{10, 20}};
const matrix_dims bias_dims[] = {{128, 1},
{64, 1},
{20, 1},
{10, 1}};
// Insert MlpNetwork class here...
class MlpNetwork {
public:
MlpNetwork(Matrix weights[], Matrix biases[]);
~MlpNetwork();
digit operator()(const Matrix& input) const;
private:
Dense* _layers[MLP_SIZE];
};
#endif // MLPNETWORK_H