# Damage Diagnosis of Frame Structure Based on Convolutional Neural Network with SE-Res2 Net Module
## 4 Experiments
### Damage Type Diagnosis Experiment  
(1) Analysis of training results  
In the process of model training, [PERSON] was used as the optimizer and the initial learning rate was set to 0.001. The training curves of the nine damage cases of the frame structure are shown in Figure 8. In order to show the training results more clearly, the curves of training epoch = 30 and training epoch = 100 were drawn, respectively. It can be seen from the figures that when the training epoch reaches 4, the training results begin to converge, the accuracy gradually rises to more than 90% and the loss begins to be less than 0.1. When the training epoch reaches 30, the loss of the training and the validation dataset reach about 0.02, and the accuracy is also higher than 98%. When the training epoch reaches 100, the loss curves tend to be gentle and fluctuate at epochs = 25, 60 and 85, respectively. The final loss is about 0.009, which shows that the proposed new model can achieve higher classification accuracy.  
(2) Confusion matrix analysis  
The confusion matrix can count the number of true and predict labels in the model diagnosis results, which is a method to evaluate the model's performance. By calculating the ratio between the number of true and predict labels in the confusion matrix, a series of classification indicators such as accuracy, precision, recall and sensitivity can be obtained  
Figure 8: Training results. (**a**) Training epoch = 30. (**b**) Training epoch = 100.  
to judge the diagnosis effect of the neural network model. The confusion matrix training results are shown in Figure 9. In order to correspond to the training curves and express the training results more clearly, the confusion matrices of training epoch = 30 and training epoch = 100 were drawn, respectively.  
It can be seen from Figure 9 that the accuracy is 99.44% when the training epoch reaches 30 and 99.78% when training epoch reaches 100. From the figures, it can be clearly distinguished which kinds of damage classification of the model have deviation, which is also the aspect that needs to be focused on in later research.  
(3) T-SNE visualization  
T-Distributed Stochastic Neighbor Embedding (T-SNE) is a dimensionality reduction technique for visualizing high-dimensional data. The T-SNE has a non-convex objective function, which is optimized by a randomly initialized gradient descent method so that different results may be obtained each time.  
In this section, the original data, the result of training epoch = 30 and the result of training epoch = 100 were visually analyzed. The results are shown in Figure 10. From the figure, it can be seen that the original dataset of nine damage cases is very confusing. After 30 epochs training, in addition to sporadic dispersion at the edge of damage case 8 and case 9, the other damage cases can be clearly distinguished. After 100 epochs training, nine damage cases can be completely and clearly distinguished, and the effect is ideal.  
(4) Analysis of test dataset results  
Figure 10: Results of T-SNE visualization.  
Figure 9: Confusion matrices of training dataset. (**a**) Training epoch = 30. (**b**) Training epoch = 100.  
The test process needs to save the trained model first, and then input the test dataset into the saved model to obtain the diagnosis results. The confusion matrix displays the diagnosis results of the test dataset, as seen in Figure 11. It can be seen from the data in Figure 11 that the data in other positions are zero--except the data on the diagonal line is 1.0--so it is easy to calculate the accuracy and recall based on the data in the figure. According to the data calculations of the confusion matrix in Figure 11, the accuracy of the test dataset reached 100% and the recall was also 100%. This shows that the proposed new model has an ideal requirement for the classification ability of damage types.