## 2 Materials and Methods
### Methods
#### 2.2.3 Convolutional Neural Network  
CNNs are inspired by the functionality of the human visual cortex and mimic human visual information processing [19]. As a prominent deep learning algorithm, CNNs have demonstrated exceptional performance in various spectral classification [44; 45; 46] and regression tasks [15; 17; 20; 25; 26; 27]. A typical 1D-CNN consists of convolutional layers, pooling layers, a flattening layer, and fully connected layers. The convolutional layers extract features from spectral data by treating the spectra as 1D sequences. These features are then passed through fully connected layers to perform accurate prediction. The overall model flow of the 1D-CNN is illustrated in Figure 4. This study first constructed a specific 1D-CNN architecture for a regression task, with its layer-wise structure presented in Figure 5.  
Figure 4: Overall model flow of the 1D-CNN. The network extracts spatial features from the input data through convolutional and pooling layers, comprising a series of convolution, activation, and pooling operations, which is followed by further processing and mapping through fully connected layers. Initially, a batch normalization layer is introduced, normalizing the input spectral reflectance to a mean of zero and a variance of one. This is followed by a 1D convolutional layer equipped with 32 filters, each with a kernel size of 3, and both stride and padding set to 1 to maintain the length of the data. The purpose of the convolutional layer is to extract local features from the input data. This is followed by a rectified linear unit (ReLU), which introduces non-linear processing to help the model learn complex feature representations. An average pooling layer then reduces the spatial dimensionality of the features, decreasing the complexity of subsequent computations and helping to reduce noise and the risk of overfitting. Subsequently, a flattening layer maps all feature maps into a 1D vector, preparing for processing by fully connected layers. Finally, three fully connected layers form the regression prediction part of the network. The first fully connected layer compresses the 3264-dimensional features from the convolutional layer down to 512 dimensions. The second fully connected layer further reduces the feature dimensions to 32. Each fully connected layer is followed by a ReLU activation function to maintain the model's non-linearity. Ultimately, a fully connected layer with an output dimension of 1 generates the final prediction outcome--the _chlorophyll a + b_ content predicted from the hyperspectral images of grape leaves. The constructed CNN model employs 10-fold cross-validation. The CNN regression model is trained using an L2 loss function (MSE) and an adaptive moment estimation (Adam) optimizer. A predefined learning rate is used during the training phase. In the outset, the learning rate is set at 0.005, which is reduced by a factor of ten every 200 iterations. The learning rate is adjusted according to this schedule, and the training process is terminated once the loss stabilizes. The batch size is set to 32. We designated the 1D-CNN regression model described earlier as CNN1-1 and subsequently developed several additional CNN models for further experimentation. The CNN architectures employed in this study are outlined in Tables 2-4. Figure 5: Structure of the CNN model. Table 2 presents four CNN models--CNN1-1, CNN1-2, CNN1-3, and CNN1-4--with a single convolutional layer. These models share a common architecture, differing only in the number of filters. Specifically, CNN1-1, CNN1-2, CNN1-3, and CNN1-4 contain 32, 64, 128, and 256 filters, respectively. Table 3 displays CNN models incorporating two convolutional layers: CNN2-1, CNN2-2, CNN2-3, and CNN2-4. In these models, the number of filters is consistent across layers. Specifically, CNN2-1 uses 32 filters per layer, CNN2-2 uses 64, CNN2-3 uses 128, and CNN2-4 uses 256 filters per layer. Table 4 illustrates CNN models with three convolutional layers: CNN3-1, CNN3-2, CNN3-3, and CNN3-4.