## 4 Experimental Data and Implementation of the Proposed Algorithm
PyTorch provides powerful tensor operations similar to NumPy and supports automatic differentiation through its auto package, simplifying gradient computation for neural networks. It provides the building blocks of neural networks, including modules for defining layers, loss functions, and optimization algorithms. PyTorch seamlessly integrates with CUDA for GPU acceleration, enabling faster training. The next step is to convert the model from PyTorch [70] to Core ML. Here, there are challenges because PyTorch is based on dynamic graphs, while Core ML works with static graphs (which are essential for model optimization). Therefore, we have to choose an intermediate format. As such a format, we used Open Neural Network Exchange (ONNX) [71]. Exporting from PyTorch is straightforward, as a result of the 'torch-onnx' module. Then, we improve the models using custom optimizations with the help of the 'onnx-simplifier' module. Subsequently, we integrated our trained models into Swift to develop a mobile application. As shown in the lower part of Figure 3, the user selects a risk category in the application interface and responds to the corresponding question associated with that specific risk. Afterward, the user will promptly receive the prediction result. The project under consideration is a case study started by a well-known company in Russia (i.e., Blagoveshcensk, Amur region). This project was completed in 14 months and was one of the largest industrial structures in the world. The two building yards constitute approximately 32,000 m\({}^{2}\) of the total construction space. Since concrete is the primary building material, each yard has three structures, each with six floors. This team consists of 12 experts: one customer representative, one project manager, one worker officer, four occupational health and safety engineers, three quality engineers, one architect, and one design engineer. Members continuously monitor the work performed on the building site. Consequently, they may provide significant information that supports this case study. The team collaborated to collect the data needed to perform the re-reporting. We collected data for 20 FEMA risks. Moreover, we started the process by compiling a list of questions and criteria required for each risk (see Appendix A). Each question was scored in the range of 0-10. Subsequently, the experts recorded all the data over the course of a year. Afterward, we generated a dedicated neural network training dataset. In a neural network, the data are randomly divided into three categories: training data (70% of the data), testing data (20% of the data), and validation data (10% of the data). After obtaining  
Figure 3: Conversion and optimization diagram of the PyTorch model to the Corel ML for embedded device. the ANN model, its efficiency was assessed by calculating the Root Mean Square Error (_RMSE_) [72]:  
\[RMSE=\sqrt{\sum_{i=1}^{n}\frac{\left(\frac{y_{i}-y_{i}}{n}\right)^{2}}{n}} \tag{22}\]  
The _RMSE_ is a criterion used to optimize variance and assigns weight to errors with larger absolute values. This criterion is commonly used as a standard statistical metric to evaluate model performance. In addition, the _RMSE_ is less sensitive to outliers than the Mean Square Error (_MSE_), as the former takes the square root of the _MSE_, and reduces the impact of large errors on the final metric [73]. When dealing with a large number of samples, the use of _RMSE_ is considered more reliable for the error distribution.