## 3 Method
### EfficientNet Neural Network  
Model scaling has been widely used to improve the accuracy of convolutional neural networks. In previous work, the most common way is to only change the network depth, width, or input image resolution of the baseline neural networks in a single dimension, as shown in Figure 3b-d. For example, [PERSON] et al. [25] greatly improved the accuracy of GPipe on the ImageNet dataset by scaling up the depth of the baseline network. Though it is possible to scale up the model in multiple dimensions at the same time, multidimensional scaling requires tedious manual tuning. To realize simple yet efficient model scaling, [PERSON] et al. [26] proposed that EfficientNet, which is obtained by a Neural Architecture Search (NAS) [27] technology and a compound scaling method, is one of the best classification performance networks on the ImageNet dataset. They first searched the structure of the baseline network using NAS technology and then scaled up the baseline network in multiple dimensions by the compound scaling method. This scaling method allows for uniform changes in the network depth, width, and input image resolution, as shown in Figure 3e, resulting in higher classification accuracy without the need for additional fine-tuning. \begin{table}
\begin{tabular}{c} Silty structure, \\ Massive structure \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Characteristics of various rocks in rock image dataset. Figure 1: Seven rock images of different types in the rock image datasets. ```
1:Input: 315 rock images containing seven types of rocks
2: Perform data pre-processing. 3: Randomly apply the following nine data augmentation operations to each image: Rotation, Salt-and-pepper noise addition, Brightening, Darkening, Enlargement, Vertical flip, Horizontal flip, Gaussian noise addition, and Translation. (The number of rock images is augmented to 6949 after augmentation.) 4: Divide the augmented images randomly into a training set, a validation set, and a test set with a ratio of 60%, 20%, and 20%. (The number of samples for them is 4169, 1389, and 1389.) 5: Construct a rock-type classification model based on EfficientNet and a triplet attention mechanism. 6: Select the EfficientNet-B7 model as the baseline model. 7: Replace each SE attention module of the EfficientNet-B7 model with the triplet attention module to construct the Triplet-Efficient model. 8: Build a classification model based on the Triplet-EfficientNet model as the backbone network. 9: Add \(1\times 1\) convolutional layer, pooling layer, fully connected layer, and softmax classifier after Triplet-EfficientNet. 10: Set the number of types for the softmax classifier to 7. 11: Start model training. 12: Use the transfer learning method: load the parameters of the pre-trained model trained on ImageNet dataset into an untrained model. 13: Set training hyperparameters: set the learning rate to 0.01, the epoch to 60, and the batch size to 16. 14: Select the Swish function as the activation function, the cross entropy function as the loss function, and Adaptive Moment Estimation(Adam) as the optimizer. 15: Uniformly scale the images in the training set to the size of 600 \(\times\) 600 \(\times\) 3 and randomly package them into the model to start the training. 16: Train all parameters of the transferred model for 60 epochs. 17: Output the final model after training. 18: Start testing: input a randomly selected rock image. 19: The probabilities of this rock image being classified as each type of rock. (The rock type corresponding to the maximum probability is the final identification result.) ```  
**Algorithm 1**A Rock-type Classification Method Based on EfficientNet and Triplet Attention Mechanism  
Figure 2: Flowchart of the classification method proposed in this study. The key to the compound scaling method based on EfficientNet is to find a set of compound coefficients of depth, width, and image resolution to maximize the network's performance. This optimization problem is mathematically formulated as in Equation (1).