-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtraining.m
62 lines (62 loc) · 2.28 KB
/
training.m
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
for i = max_size : -1 : 1
if i<=sizes(1)
inputx = train0(i,:);
inputx = binary_convertor(inputx);
targets = target(1,:);
[error,weight1,weight2] = processing(1, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(2)
inputx = train1(i,:);
inputx = binary_convertor(inputx);
targets = target(2,:);
[error,weight1,weight2] = processing(2, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(3)
inputx = train2(i,:);
inputx = binary_convertor(inputx);
targets = target(3,:);
[error,weight1,weight2] = processing(3, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(4)
inputx = train3(i,:);
inputx = binary_convertor(inputx);
targets = target(4,:);
[error,weight1,weight2] = processing(4, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(5)
inputx = train4(i,:);
inputx = binary_convertor(inputx);
targets = target(5,:);
[error,weight1,weight2] = processing(5, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(6)
inputx = train5(i,:);
inputx = binary_convertor(inputx);
targets = target(6,:);
[error,weight1,weight2] = processing(6, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(7)
inputx = train6(i,:);
inputx = binary_convertor(inputx);
targets = target(7,:);
[error,weight1,weight2] = processing(7, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(8)
inputx = train7(i,:);
inputx = binary_convertor(inputx);
targets = target(8,:);
[error,weight1,weight2] = processing(8, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(9)
inputx = train8(i,:);
inputx = binary_convertor(inputx);
targets = target(9,:);
[error,weight1,weight2] = processing(9, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
if i<=sizes(10)
inputx = train9(i,:);
inputx = binary_convertor(inputx);
targets = target(10,:);
[error,weight1,weight2] = processing(10, inputx, weight1, weight2, bias1, bias2, targets, alpha);
end
end