# Research on Lightweight Lithology Intelligent Recognition System Incorporating Attention Mechanism
## 3 Model Introduction and Construction  
### MobileNetV2 Model Introduction  
This section may be divided into subheadings. It should provide a concise and precise description of the experimental results, their interpretation, as well as the experimental conclusions that can be drawn. Google introduced the MobileNetV2 [26] network in 2018 as a lightweight convolutional neural network. Compared to conventional convolutional neural networks, the model has the following characteristics and benefits: (1) the depth separable (DWS) convolution has less operational costs and a number of network parameters; (2) the proposed inverse residual structure is more comprehensive for feature extraction with the deepening of network layers and solves problems such as gradient disappearance explosion; (3) the use of linear bottleneck (the last layer of the structure uses a linear layer) effectively reduces the loss of low-dimensional tensor features. The traditional convolution is denoted by Equation (1), but the depth-separable convolution consists of two components, \"depth convolution (DW)\" and \"point convolution (PW)\", which are represented by Equations (2) and (3), correspondingly. \[\text{Conv}(W,F)=\sum_{k,l,c}^{K,L,C}W_{(k,l,c)}\times F_{(k,l,c)} \tag{1}\]  
\[D_{-}\text{Conv}(W,F)=\sum_{k,l}^{K,L}W_{(k,l)}\times F_{(k,l)} \tag{2}\]  
\[P_{-}\text{Conv}(W,F)=\sum_{c}^{c}W_{(c)}\times F_{(c)} \tag{3}\]  
\[\text{SepConv}(W_{p},W_{d},F)=D_{-}\text{Conv}(W,F)+P_{-}\text{Conv}(W,F) \tag{4}\]  
where \(W\) is the convolution kernel; \(F\) is the matrix of input features; \(K\), \(L\), \(C\) are the convolution kernel \(W\) dimensions. According to Figure 2, assuming that the feature map input size is \(D_{F}\times D_{F}\times C_{F}\times N_{F}\), the convolution kernel size is \(D_{K}\times D_{K}\times C_{K}\times N_{K}\), and the depth convolution kernel point convolution kernel sizes are \(D_{K}\times D_{K}\times C_{F}\times 1\) and \(1\times 1\times C_{K}\times N_{F}\), respectively, the  
conventional convolution covariance calculation P1 and the covariance calculation P2 of DWS convolution can be expressed as Equations (5) and (6) [25]. \[P_{1}=D_{K}\times D_{K}\times C_{F}\times N_{K}\times D_{F}\times D \tag{5}\]  
\[P_{2}=D_{K}\times D_{K}\times C_{F}\times D_{F}\times D_{F}+C_{F}\times N_{K} \times D_{F}\times D_{F} \tag{6}\]  
where \(D_{K}\) and \(C_{K}\) are the input feature map size and the number of convolution kernel channels in conventional convolution, respectively; \(D_{F}\) and \(C_{F}\) are the input feature map size and the number of PW convolution channels in DWS convolution, respectively; \(N_{K}\) is the number of input feature map channels. Typically, the size of the convolution kernel is 3 \(\times\) 3; thus, when the size of the convolution kernel is changed from \(D_{K}\times D_{K}\times C_{K}\) to 3 \(\times\) 3 \(\times\) \(C_{K}\), the formulae for DWS convolution and classical convolution are produced (5)-(6). According to Formula (7), the P value is about one-ninth, demonstrating that the DWS convolution calculation parameter is only one-ninth of the classic convolution and that the depthwise separable convolution approach may significantly decrease the number of parameters. Decreasing reliance on computational resources, boost speed, and decrease cost. \[P=\frac{P_{1}}{P_{2}}=\frac{1}{N_{K}}+\frac{1}{D_{K}{}^{2}} \tag{7}\]  
The inverse residual structure presented by the MobileNetV2 network is based on the further evolution of Resnet based on the study results of [PERSON] et al. [27], as seen in Figure 3. In contrast to the residual connection, the inverse residual structure is based on the concept of ascending and then descending, and the layer structure is first climbed with 1*1 convolution and then activated nonlinearly with the Reluo function in the high-dimensional space. The last layer of the network utilizes a linear activation function; hence, the layer uses 1*1 convolution to downscale and activates with a linear function; a residual link is created when the step size is 1.