-
Notifications
You must be signed in to change notification settings - Fork 1
/
backprop algo.txt
33 lines (19 loc) · 946 Bytes
/
backprop algo.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
Step 1: START
Step 2: Initialise weights and biases
Step 3: DO
Step 4: FOR EACH training input image:
Step 5: error = output - target
Step 6: FOR EACH layer:
Step 7: Compute deltaW
Step 8: Update weights and biases
Step 9: UNTIL threshold value of loss is reached
Step 10: END
forEach training example named ex
prediction = neural-net-output(network, ex) // forward pass
actual = teacher-output(ex)
compute error (prediction - actual) at the output units
compute {\displaystyle \Delta w_{h}} \Delta w_h for all weights from hidden layer to output layer // backward pass
compute {\displaystyle \Delta w_{i}} \Delta w_i for all weights from input layer to hidden layer // backward pass continued
update network weights // input layer not modified by error estimate
until all examples classified correctly or another stopping criterion satisfied
return the network