|
Algorithm 1. Node Random Pruning Algorithm. |
| Given the parameters to be deleted, ,,, |
| where L is the number of node; the initial accuracy of the network, ; test data ; |
| setting an acceptable accuracy ; and the maximum number of nodes that |
| can be deleted, . |
|
1. Initialize ,,
|
|
2. For To Do
|
|
3. ,,
|
|
4.
If
|
|
5.
|
|
6.
For
To
Do
|
|
7. Randomly choice of n nodes from original nodes. |
|
8. Remove the corresponding nodes from the original list |
| based on the of the nodes to be deleted. |
|
9. delete
|
|
10. delete
|
|
11. delete
|
|
12. Calculate the accuracy of the model after removing the nodes. |
|
13. accuracy_score
|
|
14. If
|
|
15. append
|
|
16. append
|
|
17. End For (corresponds to Step 4) |
|
18. append
|
|
19. max max
|
|
20. End For (corresponds to Step 2) |
|
21. Return . |