# Succulent Plant Image Classification Based on Lightweight GoogLeNet with CBAM Attention Mechanism
## 2 Materials and Methods
### Improved Lightweight GoogLeNet
#### 2.3.2 Lightweight Inception Module
\begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Type** & \begin{tabular}{c} **Convolution** \\ **Kernel Size** \\ \end{tabular} & \begin{tabular}{c} **Output** \\ **Stride** \\ \end{tabular} & \begin{tabular}{c} **1\(\times\) 1 Convolution** \\ **Size** \\ \end{tabular} & \
\begin{tabular}{c} **3\(\times\) 3** \\ **(1)** \\ **Dimensionality** \\ **-Decreasing** \\ \end{tabular} &
\begin{tabular}{c} **Convolution** \\ **Convolution (2)** \\ **Convealing** \\ \end{tabular} \\ \hline conv & \(7\times 7\) & \(2\) & \(112\times 112\times 64\) & - & - & - & - \\ \hline conv & \(1\times 1\) & \(1\) & \(56\times 56\times 64\) & - & - & - & - \\ \hline conv & \(3\times 3\) & \(1\) & \(56\times 56\times 192\) & - & - & - & - \\ \hline Inception 3a & \(1\times 1\), & - & \(28\times 28\times 256\) & 64 & 96 & 128 & 32 \\  & \(3\times 3\), & - & & & & \\ \hline Inception 3b & \(1\times 1\), & - & \(28\times 28\times 480\) & 128 & 128 & 192 & 64 \\  & \(3\times 3\), & - & & & & \\ \hline Inception 4a & \(1\times 1\), & - & \(14\times 14\times 512\) & 192 & 96 & 208 & 64 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 4b & \(1\times 1\), & - & \(14\times 14\times 512\) & 160 & 112 & 224 & 64 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 4c & \(1\times 1\), & - & \(14\times 14\times 512\) & 128 & 128 & 256 & 64 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 4d & \(1\times 1\), & - & \(14\times 14\times 528\) & 112 & 144 & 288 & 64 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 4e & \(1\times 1\), & - & \(14\times 14\times 832\) & 256 & 160 & 320 & 128 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 5a & \(1\times 1\), & - & \(7\times 7\times 832\) & 256 & 160 & 320 & 128 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline Inception 5b & \(1\times 1\), & - & \(7\times 7\times 1024\) & 384 & 192 & 284 & 128 \\  & \(3\times 3\), & - & & & & \\  & \(5\times 5\) & - & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Network structure and parameter settings of the lightweight GoogLeNet model. \[Y(i,j)=\sum_{m=0}^{K-1}\sum_{n=0}^{K-1}X(i+m,j+n)\cdot W(m,n) \tag{7}\]  
where the convolution kernel size of K is \(1\times 1\) or \(3\times 3\). In the lightweight Inception module, replacing the \(5\times 5\) convolution with two consecutive \(3\times 3\) convolutions, the formula still follows the basic form of this convolution operation, but is divided into two \(3\times 3\) convolutions, respectively:  
\[Y_{1}(i,j)=\sum_{m=0}^{K-1}\sum_{n=0}^{K-1}X(i+m,j+n)\cdot W_{1}(m,n) \tag{8}\]  
\[Y_{2}(i,j)=\sum_{m=0}^{K-1}\sum_{n=0}^{K-1}X(i+m,j+n)\cdot W_{2}(m,n) \tag{9}\]  
By replacing the \(5\times 5\) convolution with two \(3\times 3\) convolutions, it is possible to keep the same receptive field (\(5\times 5\) coverage) but reduce the number of parameters and the amount of computation. Meanwhile, the convolutional layers in the Inception module generate a large number of computational operations whose complexity can be quantified by the number of floating point operations (FLOPs). For each convolutional layer, the FLOPs are calculated as:  
\[FLOPs=2\times(C_{in}\times H_{out}\times W_{out}\times K\times K\times C_{out}) \tag{10}\]  
where \(C_{in}\) is the number of input channels; \(C_{out}\) is the number of output channels, which also represents the height and width of the output feature map; and \(H_{out}\) and \(W_{out}\) are the sizes of the convolutional kernel. By replacing the \(5\times 5\) convolution with two \(3\times 3\) convolutions, the number of computations in the FLOPs formula is significantly reduced. Batch normalization is introduced behind the convolutional layers in each Inception module to speed up model convergence and stabilize the training process.