The early diagnosis of cancer is crucial to provide prompt and adequate management of the diseases. Imaging tests, in particular magnetic resonance imaging (MRI), are the first preferred method for diagnosis. However, these tests have some limitations which can cause a delay in detection and diagnosis. The use of computer-aided intelligent systems can assist physicians in diagnosis. In this study, we established a Convolutional Neural Network (CNN)-based brain tumor diagnosis system using EfficientNetv2s architecture, which was improved with the Ranger optimization and extensive pre-processing. We also compared the proposed model with state-of-the-art deep learning architectures such as ResNet18, ResNet200d, and InceptionV4 in discriminating brain tumors based on their spatial features. We achieved the best micro-average results with 99.85% test accuracy, 99.89% Area under the Curve (AUC), 98.16% precision, 98.17% recall, and 98.21% f1-score. Furthermore, the experimental results of the improved model were compared to various CNN-based architectures using key performance metrics and were shown to have a strong impact on tumor categorization. The proposed system has been experimentally evaluated with different optimizers and compared with recent CNN architectures, on both augmented and original data. The results demonstrated a convincing performance in tumor detection and diagnosis.