## 3 Materials and Methods
### Transfer Learning (TL)  
TL is a learning method that reuses the knowledge from a previously trained model to solve a new problem. This approach speeds up model training and improves performance. In DL models, leveraging the features of a model that has been trained extensively on large datasets can reduce the quantity of data required for a new task and enhance generalization performance. TL enables the model to quickly adapt to complex tasks by utilizing previously learned features, while also reducing computational costs by shortening the training time. A schematic representation of TL through fine-tuning is shown in Figure 3.  
In this study, to compare the performance of the proposed fine-tuned FT-EPN model, TL was applied to the same dataset using the most popular traditional models--Vgg16, Vgg19, ResNet50, InceptionV3, DenseNet121, and Xception architectures--which were pre-trained on ImageNet.  
First, the Vgg16 model pre-trained on the ImageNet dataset was loaded, excluding the classification layers. The 'include_top=False' argument was used to ensure that only the feature extraction part of the model was retained. This allowed for the preservation of general features learned in the deep layers of the model, such as edges, colors, and textures. The trainable parameter of all layers in the model was set to False, freezing the weights and preventing them from being updated during the training process, thereby allowing for only the upper layers to learn. Since the main purpose of the TL strategy is to reuse previously learned features, this step facilitated efficient general feature extraction from the data and significantly reduced training time. The optimal value for the patience parameter was determined to be 5. Consequently, the EarlyStopping mechanism was employed to halt training when no improvement in the validation loss (val_loss) was observed for 5 consecutive epochs. The restore_best_weights=True setting ensured that the model's  
Figure 3: The schematic representation of the fine-tuning process with TL.  
weights were restored to their state when the validation loss reached its minimum value. This approach helped prevent overfitting and improved overall performance. A sequential model was then created, with the pre-trained Vgg16 base added as the first component. Following this, the following new layers were added sequentially:  
Flatten: This layer flattens the data coming from the Vgg16 base. The data from the Vgg16 model are multidimensional and are transformed into a one-dimensional vector using the Flatten() layer. This process reshapes the data into a form suitable for the classifier layers, allowing for the dense layers to process it effectively.  
First Dense Layer: This layer contains 128 neurons. The features extracted by Vgg16 are reduced to a 128-dimensional vector at this stage. The Tanh activation function is used, which returns values between \(-1\) and \(1\), limiting the output of each neuron within this range. This function helps mitigate the vanishing gradient problem and allows for the relationships between neurons to be expressed over a broader range. The L2 regularization value is set to 0.0001, helping reduce overfitting by preventing the weights from becoming excessively large.  
Second Dense Layer: This layer contains 64 neurons and converts the 128-dimensional vector from the previous layer into a 64-dimensional vector. Again, the Tanh activation function and L2 regularization are applied.  
Output Dense Layer: In this layer, 2 neurons are used, corresponding to the two classes in the dataset. The sigmoid activation function, commonly used in binary classification tasks, is employed here.  
The TL models were trained with the Adam optimization algorithm, using a learning rate of 0.0001, a batch size of 32, and 10 epochs as the model parameters.