## 1 Introduction  
Cancer is the second leading cause of death globally, according to the World Health Organization (WHO) [1]. Early detection of cancer can prevent death, but this is not always possible. Unlike cancer, a tumor could be benign, pre-carcinoma, or malign. Benign tumors differ from malign in that benign generally do not spread to other organs and tissues and can be surgically removed [2]. Some of the primary brain tumors are gliomas, meningiomas, and pituitary tumors. Gliomas are a general term for tumors that arise from brain tissues other than nerve cells and blood vessels. On the other hand, meningiomas arise from the membranes that cover the brain and surround the central nervous system, whereas pituitary tumors are lumps that sit inside the skull [3; 4; 5; 6]. The most important difference between these three types of tumors is that meningiomas are typically benign, and gliomas are most commonly malignant. Pituitary tumors, even if benign, can cause other medical damage, unlike meningiomas, which are slow-growing tumors [5; 6]. Because of the information mentioned above, the precise differentiation between these three types of tumors represents a very important step of the clinical diagnostic process and later effective assessment of patients. The most common method for differential diagnostics of tumor type is magnetic resonance imaging (MRI). However, it is susceptible to human subjectivity, and a large amount of data is difficult for human observation. Early brain-tumor detection mostly depends on the experience of the radiologist [7]. The diagnostics of the tumor could not be complete before establishing whether it is benign or malignant. In order to examine whether the tissue is benign or malignant, a biopsy is usually performed. Unlike tumors elsewhere in the body, the biopsy of the brain tumor is not usually obtained before definitive brain surgery [8]. In order to obtain precise diagnostics, and to avoid surgery and subjectivity, it is important to develop an effective diagnostics tool for tumor segmentation and classification from MRI images [7]. The development of new technologies, especially artificial intelligence and machine learning, has had a significant impact on medical field, providing an important support tool for many medical branches, including imaging. Different machine-learning methods for image segmentation and classification are applied in MRI image processing to provide radiologists with a second opinion. Since 2012, the Perelman School of Medicine at the University of Pennsylvania, Center for Biomedical Image Computing & Analytics (CBICA) has been running an online competition, the Multimodal Brain Tumor Segmentation Challenge (BRATS) [9]. The image databases used in BRATS are made publicly available after the competition is finished. Different classification algorithms designed using these image databases can be found in many papers [10; 11; 12; 13; 14]. However, the databases are usually small, on average about 285 images, and they often contain images showing two tumor levels, low and high level of glioma tumor, acquired in the axial plane [10]. In addition, classification has been carried out on other image databases, which are also quite small [15; 16; 17; 18]. [PERSON] et al. used 66 images to classify four types of images showing brain tumors: tumor-free, glioblastoma, sarcoma, and metastasis. By using a deep neural network (DNN), they obtained an accuracy of 96.97% [17]. In the literature, there are other algorithms and different modifications of the pre-trained networks that are used for image analysis, classification, and segmentation. Different approaches have been tested on other medical databases, both on MRI images of brain tumors and on tumors from different parts of the human body [19; 20]. These papers were not considered further, as the focus was on the papers using the same MRI image database that we used.