# A Lightweight Convolutional Neural Network Method for Two-Dimensional PhotoPlethysmoGraphy Signals
## 3 Experiment
### Experimental Results and Analysis  
While training and testing the LW-CNN model, this experiment used the cross-entropy loss function and Adma optimizer. The primary function of the cross-entropy loss function is to measure the difference between the model prediction results and the actual labels and provide guidance for model optimization. When the loss value approaches 0, the model's prediction results are closer to the actual label. The Adma optimizer flexibly adjusts each parameter's learning rate based on the loss function's gradient information to achieve a more efficient optimization process. In the experiment, after many attempts and adjustments, we set the learning rate of the Adma optimizer to 0.001. This learning rate value effectively balances convergence speed and model stability, ensuring efficient evaluation. In addition, we also set the number of model epochs to 80 and the batch size to 128. After training, the accuracy of the LW-CNN model on the training set reached 98.62%, and the accuracy on the test set also reached 96.17%, showing good performance. Figure 5(a) shows the accuracy curves of the training set and validation set during the 80 iterations of the model. As the number of epochs increases, the accuracy gradually increases and stabilizes. Figure 5(b) shows the loss curves of the training set and the test set. As the number of epochs increases, the loss value gradually decreases and finally converges to a lower level. These results fully prove the effectiveness and stability of the LW-CNN model.  
Figure 5: Illustration of the Lightweight Convolutional Neural Network (LW-CNN).  
To evaluate the performance of the LW-CNN model more comprehensively and in-depth, in addition to observing the changing trends of the accuracy curve and loss curve, we further drew a confusion matrix to analyze the classification effect of the model in detail. The confusion matrix shows the model's intuitive classification of categories, including the number of correctly and incorrectly classified samples. We can observe the model's specific performance in each category through the confusion matrix and then better evaluate the model's performance. Precision, accuracy, recall, and F1-score can also be calculated by analyzing the confusion matrix. Precision measures the proportion of correctly predicted classifications among all the predicted correct classifications, while accuracy calculates the percentage of accurate predictions out of all predictions made. Recall establishes the ratio of correctly classified instances over the total number of genuinely correct classifications, and the F1-score balances the precision and recall measures by taking their harmonic mean. The confusion matrix for the LW-CNN model is depicted in Figure 7, with corresponding metrics of accuracy (96.17%), precision (96.24%), recall (96.28%), and F1-score (96.11%).  
This study conducted two control experiments to compare and showcase the LW-CNN model. The hyperparameters, including iteration count, batch size, learning rate, and dropout, were consistent with the LW-CNN model described earlier.  
Firstly, in the first set of experiments, the LW-CNN model utilized two-dimensional image data transformed from one-dimensional temporal data as inputs. Two other neural  
Figure 6: LW-CNN Accuracy (**a**) and Loss (**b**) Curves.  
Figure 7: Confusion matrix of LW-CNN.  
In addition, the total number of parameters required to run the three networks, the total parameter size, and the time required for each iteration are also given in Table 4. The total parameters required for LW-CNN operation are significantly smaller than the other two network models, and the training time is shorter. This means that LW-CNN has a smaller model size and faster training speed while maintaining higher accuracy. It exhibits significant lightweight characteristics and is more suitable for resource-limited and real-time applications--highly demanded by wearable devices.