-
Notifications
You must be signed in to change notification settings - Fork 0
/
grossberg2.conf
80 lines (69 loc) · 1.9 KB
/
grossberg2.conf
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
% true oznaczałoby losowanie wag dla neuronów, weights jest wtedy ignorowane
random_weights = true;
% dane wejściowe
input_data = [
0 0 0;
0 0 1;
0 1 0;
0 1 1;
1 0 0;
1 0 1;
1 1 0;
1 1 1;
];
expected = [
0;
1;
1;
0;
1;
0;
0;
1;
];
%global epochs = [1 8000 16000 24000]
global layers = {};
learn_steps = 10000;
% pierwsza warstwa
% liczba neuronów w warstwie
layers{1}.type='kohonen';
layers{1}.neurons = 8;
layers{1}.row_count = 1;
% funkcja aktywacji
layers{1}.activation_function =@(X) sigmoid(X);
% wartość bias
layers{1}.bias = 0;
% przedział, z którego są losowane wagi
layers{1}.rand_min = -1.0;
layers{1}.rand_max = 1.0;
layers{1}.neighbourhood_width = [0 0 0 0 0];%[7.0 5.0 3.0 1.0];
layers{1}.conscience_coefficient = [1.0 0.5 0.25 0.125 0]; %[0 0 0 0];%
layers{1}.learning_coefficient = [0.06 0.03 0.015 0.0075 0];
layers{1}.learn = false;
layers{1}.random_weights = false;
layers{1}.weights = [
8.7557e-02 4.7263e-04 -5.2823e-10 2.2734e-11;
8.2916e-01 5.7302e-01 5.7544e-01 5.7304e-01;
-8.3701e-01 1.0731e-01 6.4703e-01 5.9212e-01;
-5.3046e-01 2.4351e-04 9.9924e-01 1.6416e-03;
-2.2320e-01 7.0637e-01 2.2126e-03 7.0668e-01;
1.1293e-01 9.9954e-01 -3.3158e-07 -5.7041e-07;
-9.7452e-02 3.4252e-01 5.1528e-01 3.4149e-01;
-6.2274e-01 1.8204e-02 7.0302e-01 7.0302e-01;
];
layers{1}.epochs = [1 1000 2000 2500 3000];
layers{2}.type='grossberg';
layers{2}.neurons=1;
layers{2}.bias = 0;
layers{2}.rand_min = -1.0;
layers{2}.rand_max = 1.0;
layers{2}.activation_function = @(X) linear(X,1,0);
layers{2}.epochs = [3000 10000 15000 20000];
layers{2}.coeffs = [0.8 0.5 0.3 0.1];
layers{2}.epoch=0;
layers{2}.random_weights = false;
layers{2}.rule = 'delta'; %'widrow';
layers{2}.learn = false;
layers{2}.weights = [
-3.1242e-02 -1.4822e-323 1.0000e+00 3.9041e-01 1.0000e+00 1.4822e-323 1.0000e+00 4.3799e-01 1.4822e-323
];