## 2 Material and Methods
### Ultra-Light Deep Learning Architecture-Based Feature Extraction  
We proposed a specifically designed deep learning architecture for dynamic feature extraction, which was based on 15 layers, with each image passed through the network 20 epochs for 7 min and 10 s during the training phase, thus that the algorithmic requirements were tuned for the least resources with maximum efficiency and computational overhead, allowing its use to average GPU resources-based machines. It consisted of 4 convolution layers, as shown in Figure 5. The features from the first fully connected layer (FC1) were extracted to form the HFS. The UL-DLA based on the least number of layers with extensive fine-tuning culminated in intraoperative surgery support using the proposed framework. The specific purpose-based lighter CNN architectures were found to be performing better for tumor classification by avoiding overfitting in comparison to Inception-v3 and AlexNet [26]. For improved generalization, we used L2-regularization, along with a dropout layer, to maintain the weights and biases small. The methods and parameters that need to be initialized for UL-DLA, playing a vital role in achieving its best overall performance, were determined where some of them were empirically found, and the selected values, out of the under trial options, are illustrated in Table 3. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type** & **Variation** & **Extreme Value** \\ \hline \multirow{2}{*}{Rotation} & Clockwise & \(-3\) \\ \cline{2-3}  & Anti-clockwise & \(3\) \\ \hline \multirow{2}{*}{Reflection} & X-Reflection & \(1\) \\ \cline{2-3}  & Y-Reflection & \(1\) \\ \hline \multirow{2}{*}{Shear} & X-Shear & \([-0.05,\,0.05]\) \\ \cline{2-3}  & Y-Shear & \([-0.05,\,0.05]\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Geometric distortions randomly applied to the dataset. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Methods/Values Under Trail** & **Selection** \\ \hline \multirow{4}{*}{Initial Learning Rate} & Single (0.01, 0.001, 0.002, 0.005, 0.008, 0.009, 0.0002, 0.0001, \\  & 0.0003, 0.0004, 0.0005, 0.0007, 0.0008, 0.0009), Piecewise \\  & (Learn rate drop factor: 0.1, 0.2, 0.3, 0.4, 0.5; Learn rate \\ \multicolumn{3}{c}{schedule: 10, 20, 25 epochs)} \\ \hline Epochs (Maximum) & 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 75, 100 & 20 \\ \hline Mini Batch (Size) & 2, 4, 8, 16, 32 & 16 \\ \hline Pairs of Conv. Layersand Filter & 2, 3, 4, 5 & 4 \\ \hline Kernel Depth (Size of Each & 4, 8, 16, 32, 64, 128, 256 & 64, 128, 256 \\ Filter Stack) & 3 \(\times\) 3, 5 \(\times\) 5, and 7 \(\times\) 7 & 3 \(\times\) 3 \\ \hline ReLU & 2, 3, 4, 5 & 4 \\ \hline Pooling Type & MaxPool, AvgPool & MaxPool (2 \(\times\) 2) \\ \hline Fully Connected Layers & 1, 2, 3, 4 & 2 \\ \hline Number of Filter Stacks & 2, 3, 4, 5 & 4 \\ \hline \multirow{2}{*}{L2-Regularization} & 0.01, 0.05, 0.001, 0.005, 0.008, 0.0009, 0.0001, 0.0002, 0.0005, \\  & 0.0006, 0.0007, 0.0008, 0.0009 & 0.0005 \\ \hline \multirow{2}{*}{Solver Name} & Stochastic Gradient Descent with Momentum (SGDM), \\  & ADAptive Moment estimation (ADAM) & SGDM \\ \hline \hline \end{tabular}
\end{table} 
Table 3: UL-DLA parameters for dynamic features extraction. The image matrix was forwarded to the stack of convolution layers. The fully connected layer connects neurons across it and extracts features dynamically. Two fully connected layers defined in the proposed architecture were: fully connected layers 1 and 2 (FC1: 1024 neurons to capture features from the previously encoded data, and FC2: 3 neurons to capture the decision for most opted tumor category). The SoftMax layer squashes the non-normalized output of FC2 for multi-class categorization to a probability distribution for the predicted classes in the range [0, 1]. The probability for the \(i\)th class was determined from a normalized exponential function over \(C\) number of classes as given: \(P_{i}=\frac{\rho_{i}}{\sum_{c=1}^{C}\rho_{c}}\) where \(O_{i}\) represents \(i\)th class activation.