|
Algorithm 2 The reverse propagation algorithm of CNN
|
| 1 //process of the reverse propagation |
| 2 Input: The error of the output layer calculated by the loss function, the learning rate . |
| 3 Process:
|
| 4 for do |
| 5 if ( is fully connected layer) then |
| 6 get according to
|
| 7 end |
| 8 if ( is the convolutional layer) then |
| 9 get according to
|
| 10 end |
| 11 if ( is the pooling layer) then |
| 12 get according to
|
| 13 end |
| 14 end |
| 15 for do |
| 16 if( is fully connected layer) then |
| 17
|
| 18
|
| 19 end |
| 20 if( is the convolutional layer) then |
| 21
|
| 22
|
| 23 end |
| 24 end |
| 25 Output: Updated values for and . |