## Case Study
### Network Determination and Training
#### 4.2.2 Network Structures  
Previous studies have demonstrated that there exists a neural network with an intermediate layer between the input and output layers that is capable of fitting any function [25]. In general, when the other parameters are properly set, higher numbers of layers and neurons tend to result in greater accuracy. However, an excessive number of layers and neurons often leads to overfitting. Therefore, selecting the appropriate numbers of layers and neurons in the LSTM network is crucial for improving model accuracy and avoiding overfitting. Based on previous relevant studies [26; 27; 28], this study selects LSTM network layers of 1, 2, and 3 and neuron numbers of 32, 64, 128, and 256, forming a total of 12 neural network structures, as detailed in Table 2.  
The dataset C, as shown in Table 2, was utilized for training the LSTM network model. After 200 training epochs, a converged neural network model was obtained, and the representative loss function curve is depicted in Figure 6. Based on Bayesian inference theory [29], the load information of the target train riding on the railway bridge was identified. The driving speed of the target train with 4 carriages and a fixed axle spacing of 2.3 m is 50 km/h. Specific results are presented in Figure 7. Subsequently, vehicle-induced dynamic responses were then predicted using the obtained LSTM network. The performance of different LSTM network models, as listed in Table 2, for the prediction of railway bridge displacements are compared. The dimensional and non-dimensional evaluation metrics were applied to assess the prediction accuracy. Results are presented in Figure 8. Non-dimensional metrics include Pearson correlation coefficient, the weighted coefficient of determination R\({}_{W}^{2}\), and APVE. Dimensional metrics include WMAE, RMSE, and WRMSE. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Model Name**} & **LSTM** & **Number of** & **Model Name** & **LSTM** & **Number of** \\  & **Layers** & **Neurons** & & **Layers** & **Neurons** \\ \hline
1-32 & 1 & 32 & 2-128 & 2 & 128 \\
1-64 & 1 & 64 & 2-256 & 2 & 256 \\
1-128 & 1 & 128 & 3-32 & 3 & 32 \\
1-256 & 1 & 256 & 3-64 & 3 & 64 \\
2-32 & 2 & 32 & 3-128 & 3 & 128 \\
2-64 & 2 & 64 & 3-256 & 3 & 256 \\ \hline \As shown in Figure 7(a), the Pearson correlation coefficient and R\({}_{\text{W}}^{2}\) of the aforementioned LSTM network models remain above 0.9965, indicating a significant correlation between the predicted and theoretical values of bridge displacement. The overall APVE values are below 2.5%, suggesting good accuracy in predicting peak displacement values for the bridge. As illustrated in Figure 7(b), the dimensional evaluation metrics of the LSTM network models are generally below 0.015 mm, indicating good absolute accuracy in predicting bridge displacement. Overall, for the LSTM network with the same number of hidden layers, the model's prediction accuracy gradually improves with an increased number of neurons. The optimal performance is achieved when the number of neurons reaches 128. However, when the number of neurons reaches 256, there is a slight decrease in prediction accuracy. This may be attributed to overfitting caused by the enhanced nonlinearity of the model, which can be mitigated by employing additional dropout or regularization techniques [30]. The dimensional and non-dimensional evaluation metrics for assessing the acceleration prediction performance using LSTM network models as listed in Table 2 are calculated and listed in Figure 9. As illustrated in Figure 8(a), both the Pearson correlation coefficient and R\({}_{\text{W}}^{2}\) of each model fall within the range of 0.6 to 0.9, while the APVE ranges between 15% and 35%. In terms of dimensional evaluation metrics, values range from 4 to 10 mm/s\({}^{2}\). These fluctuations in metrics suggest that the accuracy of acceleration prediction is lower compared to displacement prediction.