## 3 Proposed Methods
### The CAD Framework
#### 3.3.1 CNN Model Architecture  
Individual CNN models were trained before the bagging ensemble process. This study assessed ResNet-18, ResNet-34 [14], DenseNet-121, DenseNet-169 [15], MobileNet-V2 [16], and ShuffleNet-V2 [17] CNN models. All CNN model inputs were 224 \(\times\) 224 pixels; images were resized to 224 \(\times\) 224 pixels before input. The CNN models' complexities and total parameters are presented in Table 1. Pre-trained weights from ImageNet are used for each model. An example of a CNN model architecture with a ResNet-18 backbone is portrayed in Figure 7. All convolutional layers were frozen for each pre-trained model, and the original fully-connected layers were replaced with fully-connected layers, as shown in Figure 7. The CNN layers are used for feature extraction, and only the last fully-connected layers are trained. Dropout and batch normalization layers were used in the fully-connected layers, the dropout trick [18] prevented overfitting, and the dropout rate was set to 0.2.  
In addition to dropout, another conventional regularization technique in deep learning is batch normalization (BN) [19]. BN normalizes input to a layer by subtracting the batch mean and dividing by the batch standard deviation. This step reduces the internal covariate shift, in which the layer input distributions change during training. When training a deep neural network, the input distribution to each layer shifts as the first few layer parameters shift. This process requires a reduced learning rate and careful parameter initialization, which slows training and makes it challenging to train models with saturated non-linearities. A normalization layer accelerates CNN model training, simplifies the tuning process, stabilizes network learning, and alleviates the gradient disappearance dilemma. All hyper-parameter settings are indicated in Table 2.  
This study set the epochs to 50 and batch size to 32 when training the CNN model. All input images were resized into 224 \(\times\) 224 pixels and fed to the CNN models. Additionally, the learning rate was set as 0.001, cross-entropy was used as the loss function, and the Adam optimizer was selected [20]. During CNN model training, overfitting is a prominent concern; therefore, this study also incorporated early stopping L1 (lasso  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Depth** &
\begin{tabular}{c} **Complexity** \\ **FLOPs (G)** \\ \end{tabular} & **Total Parameters (M)** \\ \hline ResNet-18 & 18 & 58.36 & 11.34 \\ ResNet-34 & 34 & 117.71 & 21.45 \\ DenseNet-121 & 121 & 92.69 & 7.54 \\ DenseNet-169 & 169 & 109.93 & 13.40 \\ MobileNet-V2 & 54 & 10.45 & 2.58 \\ ShuffleNet-V2 & 56 & 1.40 & 0.64 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The complexity and the total parameters of all the pre-trained CNN models which are used in the experiment.  
Figure 7: This is the architecture of the fine-tuned ResNet-18.  
and L2 (ridge regulation or weight decay [23]) regularization. The hyper-parameter for patience was set to five, which means the training will be stopped if the CNN model's accuracy does not improve within five epochs. Regularization is frequently incorporated into machine learning to reduce overfitting, and the most fundamental regularization is to add a penalty term to the original loss function.