Mortality in brain tumors is six times higher than other tumors due to its location. Computer systems can be used to reduce the use of inappropriate treatments and help clinicians to diagnose the disease. In this paper, a new algorithm has been used to identify tumors in 900 MRI images. This algorithm consists of four main phases, in the first phase after the input data, the preprocessing operation is performed on the images using the histogram equalization method. In the second phase, the extraction of the feature is performed using two pre-trained convolutional neural network models. The use of pre-trained convolutional neural network models makes it possible to extract higher-quality feature than traditional methods. Due to the creation of many features by convolutional neural network models, in the third phase, the probabilistic principal component analysis method is used to reduce the dimension and dependence, which ultimately extracts 100 main features of each model. In the fourth phase, using support vector machine, classification is done. In order to compare the results, three index of specificity, sensitivity, and accuracy have been used. Comparative results show that the proposed algorithm has a good performance in most data.