# Towards a Better Understanding of Transfer Learning for Medical Imaging: A Case Study
## 5 Methodology
### Training Scenarios  
We utilized different training scenarios. 1. Scenario 1: Training the proposed model from scratch with original images from target datasets. Figure 7: Transfer leaning pipeline. Training with Dataset A
* Scenario 2: Training the proposed model with Dataset C for TL purpose then fine-tuning the model to train it with A and B from Scenario 1. * Scenario 3: Training the proposed model with Dataset D for TL purpose then fine-tuning the model to train it with A and B from Scenario 1. * Scenario 4: Fine-tuning two pre-trained state-of-the-art models (VGG19, ResNet50) then training them with A and B from Scenario 1. These two models had previously been trained with the ImageNet dataset containing nature images. \begin{table}
\begin{tabular}{c c c} \hline
**Name of Layer** & **Filter Size (FS) and Stride (S)** & **Activations** \\ \hline Input layer & - & \(224\times 224\times 3\) \\ C1, B1, R1 & FS = \(3\times 3\), S = 1 & \(224\times 224\times 16\) \\ C2, B2, R2 & FS = \(5\times 5\), S = 2 & \(112\times 112\times 16\) \\ C3, B3, R3 & FS = \(1\times 1\), S = 1 & \(112\times 112\times 16\) \\ C4, B4, R4 & FS = \(3\times 3\), S = 1 & \(112\times 112\times 16\) \\ C5, B5, R5 & FS = \(5\times 5\), S = 1 & \(112\times 112\times 16\) \\ C6, B6, R6 & FS = \(7\times 7\), S = 1 & \(112\times 112\times 16\) \\ CN1 & Five inputs & \(112\times 112\times 80\) \\ B1x & Batch Normalization Layer & \(112\times 112\times 80\) \\ C7, B7, R7 & FS = \(1\times 1\), S = 2 & \(56\times 56\times 32\) \\ C8, B8, R8 & FS = \(3\times 3\), S = 2 & \(56\times 56\times 32\) \\ C9, B9, R9 & FS = \(5\times 5\), S = 2 & \(56\times 56\times 32\) \\ C10, B10, R10 & FS = \(7\times 7\), S = 2 & \(56\times 56\times 32\) \\ CN2 & Four inputs & \(56\times 56\times 128\) \\ B2x & Batch Normalization Layer & \(56\times 56\times 128\) \\ C11, B11, R11 & FS = \(1\times 1\), S = 1 & \(56\times 56\times 32\) \\ C12, B12, R12 & FS = \(3\times 3\), S = 1 & \(56\times 56\times 32\) \\ C13, B13, R13 & FS = \(5\times 5\), S = 1 & \(56\times 56\times 32\) \\ C14, B14, R14 & FS = \(7\times 7\), S = 1 & \(56\times 56\times 32\) \\ CN3 & Five inputs & \(56\times 56\times 256\) \\ B3x & Batch Normalization Layer & \(56\times 56\times 256\) \\ C15, B15, R15 & FS = \(1\times 1\), S = 2 & \(28\times 28\times 64\) \\ C16, B16, R16 & FS = \(3\times 3\), S = 2 & \(28\times 28\times 64\) \\ C17, B17, R17 & FS = \(5\times 5\), S = 2 & \(28\times 28\times 64\) \\ C18, B18, R18 & FS = \(7\times 7\), S = 2 & \(28\times 28\times 64\) \\ CN4 & Five inputs & \(28\times 28\times 272\) \\ B4x & Batch Normalization Layer & \(28\times 28\times 272\) \\ C19, B19, R19 & FS = \(1\times 1\), S = 1 & \(28\times 28\times 128\) \\ C20, B20, R20 & FS = \(3\times 3\), S = 1 & \(28\times 28\times 128\) \\ C21, B21, R21 & FS = \(5\times 5\), S = 1 & \(28\times 28\times 128\) \\ C22, B22, R22 & FS = \(7\times 7\), S = 1 & \(28\times 28\times 128\) \\ CN5 & Six inputs & \(28\times 28\times 800\) \\ B5x & Batch Normalization Layer & \(28\times 28\times 800\) \\ C23, B23, R23 & FS = \(5\times 5\), S = 4 & \(28\times 28\times 16\) \\ C24, B24, R24 & FS = \(3\times 3\), S = 2 & \(28\times 28\times 16\) \\ G1 & - & 1 \(\times 1\times 800\) \\ F1 & 400 FC & \(1\times 1\times 400\) \\ D1 & Dropout layer with learning rate:0.5 & \(1\times 1\times 400\) \\ F2 & 200 FC & \(1\times 1\times 200\) \\ D2 & Dropout layer with learning rate:0.5 & \(1\times 1\times 200\) \\ F3 & 2 FC & \(1\times 1\times 2\) \\ O (Softmax function) & Normal, Abnormal & \(1\times 1\times 2\) \\ \hline \end{tabular}
\end{table} 
Table 1: Our model architecture, C refers to convolutional layer, B refers to batch normalization Layer, R refers to rectified linear unit layer, CN refers to concatenation layer, G refers to global average pooling layer, D refers to dropout layer, F refers to the fully connected layer. Figure 8: The proposed model architecture. We achieved the visualization stage by showing what the first convolutional layer learned in our model trained in Scenario 2, Dataset A.