# Pneumonia Recognition by Deep Learning:
## 3 Results
### Comparison of the Models before Data Augmentation
#### 3.3.2 Computational Efficiency  
Computational efficiency is the time consumed by each model for training and testing per epoch round, expressed in minutes. The lower the training and testing time, the higher the computational efficiency, and the longer the training and testing time, the lower the computational efficiency. Before data augmentation and GPU loading, the computational efficiency of each model at 10 epochs is illustrated in Figure 6a, and the table is illustrated in Table 7. Before GPU loading, the LeNet5 model took only 1.5 min to complete each epoch round because of its simple model and a small number of layers. The AlexNet model and MobileNet model also had shorter computation times per epoch; the former was due to the model structure being still relatively simple and the number of layers being shallow, while the MobileNet model pursues computational efficiency due to the use of the depth-separable convolutional module, so the computational time was shorter and the computational efficiency was higher. The ResNet18 model, in contrast, had a relatively long computation time due to the deeper model depth, while the Vision Transformer model had the longest computation time, which was because the Vision Transformer model is less used in image recognition, so the computational efficiency is lower and still needs some improvement and enhancement. After GPU loading, the computational efficiency of each model at 10 epochs is illustrated in Figure 6b, and the table is illustrated in Table 8. A comparison of the efficiency of each model before and after GPU loading is illustrated in Figure 7. The computational efficiency of each model greatly improved. The LeNet5 model was not significantly improved because of its simplicity, but it improved from approximately 1.5 min to approximately 1.1 min. The AlexNet model improved from approximately 6 min to approximately 2 min \begin{table}
\begin{tabular}{c c c c c c} \hline
**Epoch** & **LeNet5 (\%)** & **AlexNet (\%)** & **ResNet18 (\%)** & **MobileNet (\%)** & **Vision Transformer (\%)** \\ \hline
1 & 50.000 & 50.000 & 57.143 & 54.444 & 53.492 \\
2 & 69.206 & 68.254 & 61.429 & 56.349 & 50.794 \\
3 & 70.794 & 69.841 & 72.698 & 70.635 & 54.444 \\
4 & 77.778 & 75.556 & 76.190 & 68.095 & 49.683 \\
5 & 70.476 & 76.349 & 76.508 & 66.984 & 53.016 \\
6 & 77.460 & 69.206 & 76.508 & 69.841 & 51.905 \\
7 & 75.079 & 73.651 & 76.984 & 73.651 & 49.524 \\
8 & 81.111 & 75.397 & 82.540 & 68.095 & 55.079 \\
9 & 75.873 & 83.968 & 70.000 & 72.381 & 53.810 \\
10 & 74.603 & 78.889 & 71.587 & 70.794 & 57.460 \\ \hline \end{tabular}
\end{table} 
Table 6: Accuracy of pneumonia recognition by each model before data augmentation and after GPU loading. Figure 5: Comparison of accuracy before data augmentation and after GPU loading. (**a**) Comparison of accuracy of each model before data augmentation and after GPU loading. (**b**) Histogram comparing the highest accuracy of each model before data augmentation and after GPU loading. compared to the ResNet18 and MobileNet models, which improved to approximately 1 min. The AlexNet model has a simple and rough structure, so the improvement in computational efficiency was less compared to the more refined ResNet18 and MobileNet models. The Vision Transformer model also improved the computational time from more than 50 min per epoch to only 17 min per epoch. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Epoch** & **LeNet5 (min)** & **AlexNet (min)** & **ResNet18 (min)** & **MobileNet (min)** & **Vision Transformer (min)** \\ \hline
1 & 1.18 & 2.03 & 1.73 & 1.55 & 17.32 \\
2 & 1.17 & 2.00 & 1.71 & 1.54 & 17.68 \\
3 & 1.16 & 2.00 & 1.70 & 1.52 & 17.75 \\
4 & 1.17 & 2.00 & 1.71 & 1.53 & 17.80 \\
5 & 1.17 & 2.01 & 1.71 & 1.52 & 17.80 \\
6 & 1.17 & 2.00 & 1.70 & 1.53 & 17.81 \\
7 & 1.17 & 2.02 & 1.71 & 1.53 & 17.81 \\
8 & 1.17 & 2.01 & 1.71 & 1.53 & 17.82 \\
9 & 1.17 & 2.01 & 1.71 & 1.53 & 17.82 \\
10 & 1.17 & 2.02 & 1.71 & 1.53 & 17.99 \\ \hline \hline \end{tabular}
\end{table}