## 2 Materials and Methods
### ConvNet Designed Architecture  
ConvNet is considered as one of the feed-forward ANNs. It is used in this study for classifying brain tumors. The ConvNet is derived from the biological arrangement of the visual cortex of mammals where the main feature extracted as the input data to the network is the full connectedness style  
Figure 1: Magnetic Resonance Imaging (MRI) of healthy subject, low-grade and high-grade glioma tumor.  
of neurons in the network architecture. ConvNet has a set of unique characteristics such as the non-fully-connected network, which is different from traditional ANN. This means that the data neurons are linked with a smaller part of the prior layer. Another important feature of ConvNet is the depth of architecture where each layer looks like a hexahedron of neurons of specific dimensions regarding height, width and depth [30].  
Figure 2 illustrates the design of our ConvNet, including the different layers in the ConvNet architecture. The input image passes through different sets of layers. These layers consist of the convolution layer, max-pooling layer and rectified linear unit (ReLU) layer. Moving to the network's rear part, the architecture includes a fully-connected layer and a softmax loss layer, which ensures that the output of the network represents the tissue class to which the input image belongs.  
We implemented a modified version of AlexNet where the size of the input image is \(160\times 160\) kernels [31] as shown in Figure 3. More specifically, the layers' configurations relative to the types and specifications of our network architecture are as follows, and Appendix A can be referred to for these layers' definitions.  
* Convolutional layers: The filter parameters of the convolutional layer are initialized by giving random numbers from a Gaussian distribution with a spatial resolution of a 20 \(\times\) 20 kernel array. The inputs to the convolutional layer are gray-scale images taken so that the filter depth at the input layer is 1. The number of filters is also set to 96, so that it spans the entire area of the input image.
* Pooling layers: This is a different type of pooling layer, wherein a maximum number of pooling layers shows the best performance. The size of the sliding window is set to 3 \(\times\) 3 kernels, and the value of the stride is set to 2. The stride of 2 means the image will be re-sampled with a value of 2. The max-pooling layer, however, decreases the spatial resolution of the image equally with the stride value. The size of the sliding window and the stride value remains the same throughout different max-pooling layers in the architecture. Then, the rectified linear unit as the non-linearity layer is used. This layer converts the entire pixel of negative values to zero, which leads to making the computations simpler and also avoids further complications due to moving forward along the other layers in the ConvNet. The convolutional, max-pooling and the non-linearity layers are replicated along the architecture.
* Fully-connected layers: They consist of two layers where each one of them decreases the spatial size of the input to 1 \(\times\) 1. The filter depth is equal to 3, corresponding to our three classes: healthy subjects, patients having a low-grade tumor and patients having a high-grade tumor.
* Softmax loss layer: This layer is responsible for estimating the performance of the network and updating the network weights through the back-propagation process, which is based on the derivation of the loss function. This simplifies classification, because outputs are either close to 0 or 1.  
Figure 2: Layer structure of the proposed architecture.