-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManagedLayer.hpp
More file actions
64 lines (53 loc) · 1.05 KB
/
ManagedLayer.hpp
File metadata and controls
64 lines (53 loc) · 1.05 KB
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
#ifndef MANAGED_LAYER_HPP
#define MANAGED_LAYER_HPP
#include "LayerTypes.hpp"
#include "ManagedArray.hpp"
class ManagedLayer
{
public:
LayerTypes Type;
int OutputMaps = 0;
int Scale = 0;
int KernelSize = 0;
ManagedArray FeatureMap = NULL; // FeatureMap[i][j][x][y]
ManagedArray DeltaFeatureMap = NULL;
ManagedArray Activation = NULL; // Activation[i][x][y][z]
ManagedArray Delta = NULL;
// 1D
ManagedArray Bias = NULL;
ManagedArray DeltaBias = NULL;
ManagedLayer()
{
Type = Input;
Activation = NULL;
Delta = NULL;
Bias = NULL;
DeltaBias = NULL;
FeatureMap = NULL;
DeltaFeatureMap = NULL;
}
ManagedLayer(int scale)
{
Type = Subsampling;
Scale = scale;
Activation = NULL;
Delta = NULL;
Bias = NULL;
DeltaBias = NULL;
FeatureMap = NULL;
DeltaFeatureMap = NULL;
}
ManagedLayer(int outputMaps, int kernelSize)
{
Type = Convolution;
KernelSize = kernelSize;
OutputMaps = outputMaps;
Activation = NULL;
Delta = NULL;
Bias = NULL;
DeltaBias = NULL;
FeatureMap = NULL;
DeltaFeatureMap = NULL;
}
};
#endif