-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidea.txt
76 lines (56 loc) · 1.79 KB
/
idea.txt
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
suppose:
output
/\
hidden 2
/\
hidden 1
/\
input
layout of states & error (Buf B)
|input error der. (optional)
|hidden 1 error.....
|hidden 2 error.......
20|output error......
|
|input states....
|hidden states 1....
|hidden states 2......
0|output states.....
y +---------------- . .
x 0 ~300
layout of weights (Buf C)
|t...........
|u...........
hid1+hid2|o hid2......
|2.............
|d.............
|i.............
hid1|h hid1........
|1.........
|d.........
|i.........
0|h input...
y +---------------- . .
x 0 ~300
process:
- Buf A
render training input // frame 0
render expected output // frame 0
(render test input) // frame 0
// hold for NUM_LAYERS * 2 frames
// (NUM_LAYERS * 1 when not training)
- Buf B
copy input states // frame 0
fprop(input, hidden1) // frame 1
fprop(hidden1, hidden2) // frame 2
fprop(hidden2, output) // frame 3
(when training)
calc_error(output - expected) // frame 4
bprop(output, hidden2) // frame 5
bprop(hidden2, hidden1) // frame 6
// optionally for displaying error in input
bprop(hidden1, input) // frame 7
- Buf C
adjust_weights(hidden2, output, output error) // frame 5
adjust_weights(hidden1, hidden1, hidden2 error) // frame 6
adjust_weights(hidden1, input, hidden1 error) // frame 7