# Brain Tumor Detection with Deep Learning Methods' Classifier Optimization Using Medical Images
## 3 Material and Method
### Convolutional Neural Network (CNN) Model  
Convolutional neural networks (CNNs) are a type of artificial neural network that has been successfully used in computer vision, voice recognition, natural language processing and various other tasks. CNNs are typically designed to work with two- or three-dimensional input data, such as visual data analysis. CNNs contain convolutional layers that are specifically designed for use in visual recognition tasks. These layers use filters or feature maps to learn and recognize features in the input data. They can be highly effective in visual tasks, for example, recognizing edges, patterns or objects in an image. In Figure 4, the general structure of CNN architecture is expressed. Figure 3: Brain tumor dataset model flow chart. The general components of CNNs are convolution layers. These are the layers that extract feature maps by performing convolution on the input data. In this way, features can be learned hierarchically. In this way, the learned information can be transferred between layers. After the convolution layers, an activation function is usually used. Activation functions are often used to solve nonlinear problems. When applying deep learning methods, all values obtained after matrix multipliers in the convolution layer are linear [24]. Activation functions are chosen depending on the structure of the estimation problem. Sigmoid, Softmax, Hyperbolic Tangent and ReLU are commonly preferred activation functions. After the convolution layers, pooling layers are usually used to provide scaling and position invariance. These layers can reduce the size of feature maps and images by reducing the number of parameters and highlighting important features. Finally, for the classification or regression process, the features extracted by the convolution layers are used in the fully connected layers to achieve the desired result. With the rapid development of the CPUs and GPUs of workstation computers, computational techniques are used to train CNNs more efficiently [25]. When the studies in the literature are examined, convolutional neural networks are the most popular and powerful tool for image processing, classification and segmentation. CNNs have achieved great success, especially in visual tasks such as image classification, object recognition and face recognition. Various architectural variations can be found, but the basic principles are generally similar [26]. While algorithms are inferring data from images, different extraction methods can be developed according to the characteristics of the image. Generally, pixel values in images are used in classification processes. Algorithms read images based on their pixel values. Each image is a combination of pixel values. Changing the pixel values will also change the image. The properties/inputs of the neural network become pixel values. Thus, the model reads the pixel values for an image, and performs feature extraction and classification. Here, a loss function is determined that measures how far the model's predictions are from the true labels. This function provides a metric to evaluate the performance of the model. Then, if the model accuracy is not at the desired level, different back-propagation algorithms and optimization techniques are applied to update the weights to minimize the loss of the model. Stochastic gradient descent or derivative algorithms can be used here [27]. These steps are used in the training phase of the deep learning model. Once the model is trained, the trained network can be used to make inferences from new images. That is, new, unseen data can be predicted using the features learned by the model. This is usually performed on test data to evaluate the applicability and generalization capabilities of the model. Apart from the models we use, there are many studies in the literature, especially on GoogleNet and MobileNet. GoogleNet is a complex architecture due to the Inception modules in its structure. GoogLeNet was the winner of the ImageNet 2014 competition, with 22 layers and an error rate of 5.7%.