-
Notifications
You must be signed in to change notification settings - Fork 1
/
FCLayer.h
80 lines (60 loc) · 1.22 KB
/
FCLayer.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//
// Created by Filip Lux on 24.11.16.
//
#ifndef NN_NEURON_FCLAYER_H
#define NN_NEURON_FCLAYER_H
#include "Layer.h"
/**
*@brief FullConnected layer
*/
class FCLayer : public Layer{
public:
double* ddot;
double* out;
double* w;
double* input;
double* down_ddot;
/**
*@brief constructor for the first layer
*@param inputs number of inputs
*@param neurons number of neurons
*/
FCLayer(int &inputs, int &neurons);
/**
*@brief constructor for the upper layers
*@param inputs number of inputs
*@param neurons number of neurons
*@param lower lower layer
*/
FCLayer(int &inputs, int &neurons, Layer* lower);
/**
*@brief forward
*/
void forward_layer();
/**
* @brief backpropagation
*/
void backProp_layer();
/**
* @brief backpropagation for last layer
* @param result expected values
*/
void computeError(double* result);
/**
* @brief print weights
*/
void learn();
/**
* @brief unsert new values to input
*/
void update_input(double* in);
/**
* @brief print
*/
void print();
/**
* @brief destructor
*/
~FCLayer();
};
#endif //NN_NEURON_FCLAYER_H