## 4 Result Analysis and Discussion  
This study validates the effectiveness of the SwT+Resnet50V2 model by evaluating its performance on the Br35H and Kaggle datasets. The Br35H dataset [49] categorizes 3000 images into two groups: normal and tumor. Furthermore, the second dataset contains T1-weighted contrast images of several types of brain tumors [50]. The collection has 926 images categorized as gliomas, 937 as meningiomas, 901 as pituitary tumors, and 396 as normal, as shown in Figure 4. The present research partitions the dataset into three subsets and relies on the following proportion of testing and training data: 80% for training, 10% for validation, and 10% for testing. Table 3 shows the hyperparameter combinations employed to simulate the proposed model using a Python application. ReLU was applied as an activation function, with batch sizes of 32, 25, and 50 epochs, a learning rate of 0.0001, and a dropout rate of 0.5. Initial testing, which systematically evaluated various values to enhance the model's performance, influenced the selection of these hyperparameters. For instance, we evaluated different learning rates (from 0.001 to 0.00001) and batch sizes (16, 32, and 64), selecting the most effective combination based on validation accuracy and loss. Throughout the training, a learning rate of 0.0001 and a batch size of 32 continuously achieved outstanding convergence, avoiding overfitting and ensuring dependable gradient updates. We selected a dropout rate of 0.5 to regularize the model and prevent overfitting. To avoid overfitting and underfitting, we used epochs of 25 and 50. The ReLU activation function was chosen because it works well for allowing gradient propagation in deep learning applications.  
In Table 3, the specified hyperparameters are well balanced about training the model. We also introduced a relatively small batch size of 32 to prevent overfitting of the data. The learning rate equals 0.0001, which ensures that the convergence process will be slow and prevents the model from diverging. The best-suited optimizer for this purpose is the Adam optimizer, which is a popular choice due to its optimization capacity, robustness, and stable performance. The ReLU activation function helps prevent the vanishing gradient issue, and the 0.5 dropout rate adds a level of randomness to the network, reducing the likelihood of overfitting. Many deep learning applications find the 25-50 epochs optimal  
Figure 4: Instances of the types of brain tumor in MRI images.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameter** & **Value** \\ \hline Batch size & 32 \\ \hline Learning rate & 0.0001 \\ \hline Optimizer & Adam \\ \hline Activation function & ReLU \\ \hline Dropout & 0.5 \\ \hline Epochs & 25 \\ \hline Output activation function & Softmax \\ \hline \hline \end{tabular}
\end{table}
Table 3: Hyperparameters Values for Training the Proposed Model and Other Models.  
as they enable the learning of complex patterns without requiring the model to undergo an extended learning cycle. Finally, the choice of hyperparameters also depends on the specific problem; Softmax is better suited for multi-class problems, while sigmoid is more appropriate for binary problems; broadly, all these hyperparameters show good knowledge of deep learning methods and an aspiration to achieve maximum performance.