## 2 Methodology
### Training Network  
We used a \(k\)-fold cross-validation method to test the network performance [24]. Two different approaches were implemented, and both consisted of 10-fold cross-validation. The first approach was \begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer No.** & **Layer Name** & **Layer Properties** \\ \hline
1 & Image Input & \(256\times 256\times 1\) images \\
2 & Convolutional & \(16\times 5\times 1\) convolutions with stride [2 2] and padding ’same’ \\
3 & Rectified Linear Unit & Rectified Linear Unit \\
4 & Dropout & \(50\%\) dropout \\
5 & Max Pooling & \(2\times 2\) max pooling with stride [2 2] and padding [0 0 0 0] \\
6 & Convolutional & \(32\times 3\times 16\) convolutions with stride [2 2] and padding ’same’ \\
7 & Rectified Linear Unit & Rectified Linear Unit \\
8 & Dropout & \(50\%\) dropout \\
9 & Max Pooling & \(2\times 2\) max pooling with stride [2 2] and padding [0 0 0 0] \\
10 & Convolutional & \(64\times 3\times 32\) convolutions with stride [1 1] and padding ’same’ \\
11 & Rectified Linear Unit & Rectified Linear Unit \\
12 & Dropout & \(50\%\) dropout \\
13 & Max Pooling & \(2\times 2\) max pooling with stride [2 2] and padding [0 0 0 0] \\
14 & Convolutional & \(128\times 3\times 64\) convolutions with stride [1 1] and padding \\
15 & Rectified Linear Unit & Rectified Linear Unit \\
16 & Dropout & \(50\%\) dropout \\
17 & Max Pooling & \(2\times 2\) max pooling with stride [2 2] and padding [0 0 0 0] \\
18 & Fully Connected & \(1024\) hidden neurons in fully connected (FC) layer \\
19 & Rectified Linear Unit & Rectified Linear Unit \\
20 & Fully Connected & \(3\) hidden neurons in fully connected layer \\
21 & Softmax & softmax \\
22 & Classification Output & \(3\) output classes, “1” for meningioma, “2” for glioma, and “3” for a pituitary tumor \\ \hline \hline \end{tabular}
\end{table} 
Table 1: New CNN architecture. All network layers are listed with their properties. Figure 2: Schematic representation of convolutional neural network (CNN) architecture containing the input layer, two Blocks A, two Blocks B, classification block and output. Block A and Block B differ only in the convolution layer. Convolution layer in Block A gives an output two times smaller than the input, whereas the convolutional layer in Block B gives the same size output as input. to randomly divide the data into 10 approximately equal portions so that each tumor category was equally present in each portion, referred to as record-wise cross-validation. The second approach was to randomly divide the data into 10 approximately equal portions where the data from a single subject could only be found in one of the sets. Each set, therefore, contained data from a couple of subjects regardless of the tumor class, referred to as subject-wise cross-validation. The second approach was implemented to test the generalization capability of the network in medical diagnostics [25]. The generalization capability in clinical practice represents the ability to predict the diagnosis based on the data obtained from subjects from which there are no observations in the training process. Therefore, observations from individuals in the training set must not appear in the test set. If this is not the case, complex predictors can pick up a confounding relationship between identity and diagnostic status and so produce unrealistically high prediction accuracy [26]. In order to compare the performance of our network with other state-of-the-art methods, we also tested our network without \(k\)-fold cross-validation (one test). In all the above-mentioned methods, two data portions were used for the test, two for validation, and six for training. Both datasets, normal and augmented, were tested using all the methods. The network was trained using an Adam optimizer, with a mini-batch size equal to 16 and data shuffling in every iteration. The early-stop condition that affects when the process of network training will stop corresponds to one epoch.