# Application of Deep Neural Networks in Recognition of Selected Types of Objects in Digital Images
## 3 Discussion of Results  
This section of the paper interprets the results obtained in research on optimizing neural network models. These results are discussed in the chapter on presentation of research results, where various approaches to training LeNet-5, AlexNet, and GoogLeNet models are presented. Comparison of different batch sizes: Analysis of the results showed that the size of the batch has a significant impact on the performance of the models. For the LeNet-5 model, a batch size of 32 proved to be the optimal choice, providing a balance between stability and training time. For the AlexNet model, on the other hand, a batch size of 16 proved optimal, offering good accuracy with efficient use of resources. GoogLeNet, as the most complex architecture, showed more variability in results depending on the batch size. The best results in terms of stability were obtained with a batch size of 8, but increasing the batch size to 32 resulted in improved accuracy and reduced training time. Effect of activation function on model performance: The activation functions proved crucial to the performance of the models, as confirmed by the experimental results. For the LeNet-5 model, the ReLU function, despite having the lowest accuracy, showed the lowest GPU consumption, suggesting its energy efficiency. Leaky ReLU proved to be the most efficient activation function for the GoogLeNet model, offering the best balance between accuracy and resource consumption. Effect of learning rate on model performance: Research on the learning rate has shown that dynamically adjusting this parameter during training brings significant benefits. [PERSON]'s optimizer with dynamic learning rate allowed high accuracy while reducing the loss for all three models. The best results were obtained using a Plateau learning rate reduction strategy, confirming the high efficiency of this method in the context of optimizing neural network models. Results of final architecture training  
Figure 26: Graphs showing the training process of the YOLOv8 model using transfer learning. The top graphs show the changes in losses (train/loss, val/loss), and the bottom graphs show the accuracy of top-1 and top-5 classifications (metrics/accuracy_top1, metrics/accuracy_top5). for optimal hyperparameters: The results of the final workouts for the LeNet-5, AlexNet, and GoogLeNet architectures, conducted on the full dataset using the best hyperparameter configurations, showed significant differences in the performance and efficiency of each architecture. LeNet-5, which is the least complex model, achieved the best training stability with a batch size of 32 and the Adam optimizer with Plateau learning rate reduction. For AlexNet, a batch size of 16 proved optimal, providing the best compromise between accuracy and training time. GoogLeNet, as the most complex of the architectures tested, performed best with larger batch sizes (32), which contributed to higher accuracy and shorter training times, albeit at the cost of greater variability in results. Figure 27 shows the normalized confusion matrix for the LeNet-5 model, which represents the proportion of correct and incorrect classifications of each class, showing how well the model recognizes each class and which classes it most often confuses them with. The LeNet-5 model does a good job of classifying butterflies and spiders, as can be seen by the high values on the diagonal of the confusion matrix for these classes. However, the model often confuses other classes just with butterflies and spiders. This may indicate that the features that the model considers crucial for distinguishing between classes are more pronounced for butterflies and spiders, while for other classes, such as elephant, cat, sheep, and squirrel, these features are not sufficiently differentiating. The model obtains the worst results for the elephant, cat, sheep, and squirrel classes, which may be due to the similarity in visual features that the model considers important.