# A Lightweight Attention-Based Network towards Distracted Driving Behavior Recognition
## 4 Experimental Results
### Performance Evaluation of LWANet
#### 4.4.3 Ablation Study  
We perform ablation studies to evaluate the effectiveness of the lightweight structure and the IRAM. The structures are compared in terms of FLOPs (floating-point operations), trainable parameters, size of.pb model file, classification accuracy on both datasets, GPU processing speed, and Android phone processing speed. For most convolutional neural networks, convolutional layers and fully connected layers cover a large proportion of the network FLOPs. The FLOPs of a convolutional layer are defined in (10). \[\text{FLOPs}_{CONV}=O\left(\sum_{l=1}^{D}M_{l}^{2}K_{l}^{2}C_{l-1}C_{l}\ \right), \tag{10}\]  
where \(D\) is the depth of the network, \(l\) is the \(l\)th convolutional layer, \(M\) is the length of the feature map for each convolutional kernel, \(K\) is the size of the convolutional kernel, and \(C_{l}\) is the number of channels of the \(l\)th convolutional layer. For a fully connected layer, if the dimension of the input data is \((N,D)\), the weight dimension of a hidden layer is \((D,M)\) and the dimension of output data is \((N,M)\). The FLOPs of a fully connected layer are defined in (11):  
\[\text{FLOPs}_{FC}=(2D-1)M \tag{11}\]  
Trainable parameters refer to the total amount of parameters in a network. In general cases, trainable parameters are mostly related to the weights and biases. It is expected that the proposed network with an optimized structure and involvement of depthwise separable convolution will result in fewer FLOPs, trainable parameters, model file size, and faster processing speed. At the same time, the testing accuracy should remain the same or even higher. The results are shown in Table 5.  
By comparing the standard VGG16 and the lightweight VGG without IRAM, the involvement of depthwise separable convolution and network compression results in 98.32% FLOPs reduction and 98.16% trainable parameters decrease. The model file size is reduced from 248 MB to 4.58 MB. The processing speed on Android phone increases by 1538.81%. The improvement of model complexity is accompanied by the sacrifice of model accuracy. The model accuracy decreases a bit on both datasets. This is not surprising \begin{table}
\begin{tabular}{c c} \hline \hline
**Items** & **LWANet** \\ \hline GPU Processing Speed & 1485 \(\pm\) 83 FPS \\ Android Phone Processing Speed & 10.77 \(\pm\) 1.35 FPS \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Real-time performance evaluation. Figure 11: Schematic of an Android App development. because, in standard VGG16, there are 13 convolution layers. For the lightweight VGG without IRAM, there are only seven convolution layers and two of them are depthwise separable convolution layers. Fewer convolution layers will extract fewer high-level features. Nevertheless, according to this ablation study, we can conclude that the proposed lightweight network can maintain relatively high accuracy with very low computation cost. The proposed IRAM is designed with two modules in series and channel attention first. There are another two configurations, which are indicated in Figure 12. We compare their accuracy on both datasets and summarize the results in Table 6. It demonstrates that the configuration of IRAM is the most desirable. The ablation study of the IRAM is presented by comparing the lightweight VGG without IRAM with LWANet. The IRAM module embedded in the network causes 0.64% FLOPs increase, 2.05% trainable parameters increase, and 1.91% Android phone processing speed decrease. The model file size has increased by 0.1 MB. The model accuracy improved by 0.5% on the SF3D dataset and 1.13% on the AUC2D dataset. Suppose the tested Android phone is used in a vehicle and is capturing videos with 10 FPS. The 0.5%