## 4 Dataset and Hyperparameter Selection
### Impact of Hyperparameters in the Custom Model  
According to Section 3.2, we have selected three hyperparameters to analyze their impact on the classifier's performance as follows: image size, dropout and optimizer. The first two are hyperparameters of the structure and the last one corresponds to the training algorithm. It is worth mentioning that, in the selection of the architecture and training hyperparameters, a previous stage was performed to select among others the number of convolutional layers, the number of filters per layer, the stride and padding values and the activation function. The objective of this section is to show the impact of the most influential hyperparameters on the results of internal validation.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameter** & **Options** \\ \hline Image size & 256 \(\times\) 256, 400 \(\times\) 400, 512 \(\times\) 512 \\ Dropout & 0.15, 0.25, 0.35, 0.45 \\ Optimizer & RMSProp, SGD, Adam \\ \hline \hline \end{tabular}
\end{table}
Table 3: Experimental hyperparameters evaluated for the proposed custom network.  
One of the decisions that the designer of CNN architectures must take corresponds to the image size, because it is a non-default hyperparameter and it can affect the performance of the classifier as well as limit the depth of the network. For example, if an input image is 28 \(\times\) 28 pixels (px), the number of pooling layers are limited, because the size of the feature maps gets smaller and smaller and from one layer its size can be 1 \(\times\) 1 px. Therefore, this was one of the hyperparameters evaluated in this test. Specifically, three image sizes were tested: 256 \(\times\) 256 px, 400 \(\times\) 400 px and 512 \(\times\) 512 px, which were chosen considering the default size of pre-trained models such as the VGG-16 (x224 \(\times\) 224 px), i.e., with a similar size and larger sizes. Regardless of the original size of the image, which could be of a higher or lower resolution than the one selected, it is resized before entering the network.  
For this test, dropout was set at 0.25, and [PERSON] was selected as the optimizer. Figure 5 shows the results in terms of HTER for internal validation, where the high dependence of the classifier's performance in relation to the image size is clear. According to the tests performed, the custom model works best with a 400 \(\times\) 400 px image size.  
The second hyperparameter analyzed in this section corresponds to the dropout value. This is a regularization technique that allows for better results in terms of generalization.  
Figure 4: F1-scores using different datasets: (**a**) custom model using DA; (**b**) custom model using DB; (**c**) custom model using DC; (**d**) VGG-16 based model using DA; (**e**) VGG-16-based model using DB; (**f**) VGG-16-based model using DC.  
Figure 5: Impact of the input image size in the custom model in terms of HTER (the lower the better).  
For this test, the image size is fixed in 400 \(\times\) 400 px and the Adam optimizer was selected. Figure 6 shows the results of four different values of dropout. In this test, the best result was obtained with 0.25 dropout.  
Finally, the custom architecture was trained with three different optimizers. The learning rate was fixed in the Tensorflow default value, dropout is 0.25, and the image size is 400 \(\times\) 400 px. Figure 7 shows the results of this test. Performance was significantly worse with RMSProp, whereas Adam and SGD optimizers achieved equal performance.  
At the end of the previous tests, the following hyperparameters were selected for the custom model: dropout of 0.25, Adam optimizer and 400 \(\times\) 400 px in the input image size. The other hyperparameter values correspond to those presented in Table 1.