-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMlpNetwork.h
51 lines (44 loc) · 1.15 KB
/
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
44
45
46
47
48
49
50
51
//MlpNetwork.h
#ifndef MLPNETWORK_H
#define MLPNETWORK_H
#include "Matrix.h"
#include "Dense.h"
#include "Digit.h"
#define MLP_SIZE 4
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}};
/*
* MlpNetwork class
*/
class MlpNetwork
{
private:
Matrix w1;
Matrix w2;
Matrix w3;
Matrix w4;
Matrix b1;
Matrix b2;
Matrix b3;
Matrix b4;
public:
/*
* MlpNetwork class constructor
*/
MlpNetwork(Matrix weights[], Matrix biases[]);
/*
* parenthesis operator which activates the network by using the 4 layers.
* @param input matrix fot this network
* @return the digit that the network predicted after calculating all
* layers.
*/
digit operator()(Matrix &input);
};
#endif // MLPNETWORK_H