|
Algorithm 1: Hyperparametric optimization algorithm of PSO-CNN. |
| Input: MAX_Iteration, boundary of the hyperparametric space θ, number of particles n
|
| Output: Optimal super parameters and maximum fault feature recognition accuracy |
| 1 Randomly generate n particles to form the initial population: |
|
|
| Set an optimal super parameter () and maximum accuracy (accuracy_best) |
| 2 for I = 1:MAX_Iteration |
| 3 for j = 1: n
|
| 4 train CNN model and output accuracy |
| 5 accuracy execute (CNN model) |
| 6 if accuracy > accuracy_max
|
| 7
|
| 8 accuracy_best accuracy
|
| 9 Update the speed and position of each particle |