## 3 Selection of Basic Deep Learning Mode
### Model Test Environment and Evaluation Metrics
#### 3.1.2 Model Evaluation Metrics  
In the process of model training, the values of hyperparameters like optimizers and learning rates have to be continuously adjusted. While choosing the convolutional neural  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layers** & **Input Size** & **Size** & **Output Size** \\ \hline Multiscale convolution layer & \(48\times 48\times 1\) & \(\begin{bmatrix}1\times 1\ conv&5\times 5\ conv\\ 3\times 3\ conv&3\times 3\ conv\end{bmatrix}\times 20\) & \(48\times 48\times 80\) \\ Dense Block 1 & \(48\times 48\times 80\) & \(\begin{bmatrix}1\times 1&conv\\ 3\times 3&conv\end{bmatrix}\times 8\) & \(48\times 48\times 336\) \\ ECANet & \(48\times 48\times 336\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(24\times 24\times 160\) \\ Transition Layer 1 & \(48\times 48\times 336\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(24\times 24\times 160\) \\ Dense Block 2 & \(24\times 24\times 160\) & \(\begin{bmatrix}1\times 1&conv\\ 3\times 3&conv\end{bmatrix}\times 8\) & \(24\times 24\times 416\) \\ ECANet & \(24\times 24\times 416\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(24\times 24\times 416\) \\ Transition Layer 2 & \(24\times 24\times 416\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(12\times 12\times 208\) \\ Dense Block 3 & \(12\times 12\times 208\) & \(\begin{bmatrix}1\times 1&conv\\ 3\times 3&conv\end{bmatrix}\times 8\) & \(12\times 12\times 464\) \\ ECANet & \(12\times 12\times 464\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(12\times 12\times 464\) \\ Transition Layer 3 & \(12\times 12\times 464\) & \(\begin{bmatrix}1\times 1&conv\\ 2\times 2&conv\end{bmatrix}\) & \(6\times 6\times 464\) \\ GAP & \(6\times 6\times 464\) & \(6\times 6\) pool & \(464\) \\ FC & \(464\) & \(7\) & \(7\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Improved network parameters of DenseNet121 model.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Configuration** & **Information** \\ \hline Operating System & Windows 11 \\ RAM & 16 GB \\ CPU frequency & 3.20 GHz \\ GPU & NVIDIA GeForce RTX 3060 \\ GPU memory & 6 GB \\ \hline \hline \end{tabular}
\end{table}
Table 5: Configuration of the computer.  
network model, the best-performing model among various sets of hyperparameters is used as the final model. This will ensure that the model performs at its optimum. In this research, the winter wheat drought stress identification and classification model is comprehensively evaluated by multiple indicators, including accuracy of drought stress identification, precision of drought stress classification, and comprehensive evaluation indicator F1 value. A1 reflects the accuracy of drought identification, P1 reflects the result of classification, and F1 is the harmonic mean of precision and recall, which is used to evaluate a model's accuracy of wheat drought image recognition.  
1. Accuracy (A1) refers to the proportion of samples correctly classified by the classifier to the total number of samples. Its formula is as follows: \[\text{A}_{1}= \frac{\text{TP}+\text{TN}}{\text{TP}+\text{TN}+\text{FP}+\text{ FN}}\] (2)
2. Precision (P1) refers to the proportion of actual positive samples in the samples predicted to be positive for each category. Its formula is as follows: \[\text{P}_{1}= \frac{\text{TP}}{\text{TP}+\text{FP}}\] (3)
3. Recall (R1) represents the proportion of positive samples in each category predicted as positive. The formula is as follows: \[\text{R}_{1}=\frac{\text{TP}}{\text{TP}+\text{FN}}\] (4)
4. The F1 value is a comprehensive evaluation indicator. It is the harmonic mean of precision and recall. A higher F1 value indicates better classifier performance. The F1 value formula is as follows: \[\text{F1}= \frac{2\text{P}_{1}\text{R}_{1}}{\text{P}_{1}+\text{R}_{1}}\] (5)  
The confusion matrix for determining whether the classification of winter wheat is correct based on the recognition model is shown in Table 6.