# A CNN-Based Strategy to Classify MRI-Based Brain Tumors Using Deep Convolutional Network
## 3 Materials and Methods
### Proposed Model  
Figure 3 shows the architecture of the proposed model. Here, we have implemented a similar structure to the VGG-16 architecture. VGG-16 is a deep CNN architecture that contains numerous different layers. The VGG model inspired us to utilize several (deeper architecture) convolution layers to use a restricted receptive field, followed by a max pooling layer to decrease image dimensionality by decreasing the number of pixels in the convolution layer output. CNN is a very deep architecture for a large number of image datasets for image recognition [48]. It gives a particularly good accuracy in large-scale image processing. In our model, there are 21 layers, where the first 20 layers use the ReLU (Rectified Linear Unit) function, and the last one is the SoftMax function. Overfitting is a common problem in machine learning while training a large model with a high number of parameters and a relatively small training dataset. Dropout regularization is a technique for combating overfitting. We have used dropout layers to reduce overfitting. The moving edges of hidden node neurons that make up the hidden layers  
Figure 2: Images of the normal brain and the other three types of brain tumors—Glioma, Meningioma and Pituitary. are randomly set at 0 while updating the training phase [35]. In the proposed model, we found that 20% dropout gives the most accurate values. In Figure 4, all nodes relate to the output layer. After dropping out, some of the nodes are avoided to help our model to reduce overfitting. In our proposed model, we have used a Stochastic Gradient Descent (SGD) optimizer. SGD subtracts the weights from the gradient multiplied by the learning rate. SGD has strong theoretical foundations and is still used in edge-training NNs, despite its simplicity [49]. \[\theta_{i}=\theta_{i}-\alpha\frac{\partial L}{\partial\theta_{i}} \tag{1}\]  
Figure 4: Comparison between before and after dropout of nodes. Figure 3: The modified VGG-16 model. Batch normalization is an effective CNN training technique that processes the input to each layer for each mini-batch [50]. The function of batch normalization used here is  
\[y_{i}=\gamma_{B}.\overline{x_{i}}+\beta_{B} \tag{2}\]  
In the proposed model, the last layer is softmax. After finding the normalization in channel B for a mini-batch, an arbitrary value is multiplied, which works as a scaling transformation, and another arbitrary value is added to shift it. These values are set by \(0/1\) as default and get updated after each epoch. This function reduces the problem with input value changing by stabilizing the values, thus increasing the training speed in our model. We divide our batch into 42 images. To build our model, we used different parameters and different layers. The summary of the model is given in Table 2.  
After the input layer, there are six sets of layers in one set, which are Convo2D, MaxPool, and batch normalization layers with different shapes. Then, there is a flatten layer. After that, there are three dropout layers and three dense layers. In this case, it is a multi-class.