In this paper, we present a novel classifier based on fuzzy logic and wavelet transformation in the form of a neural network. This classifier includes a layer to predict the numerical feature corresponded to labels or classes. The presented classifier is implemented in brain tumor diagnosis. For feature extraction, a fractal model with four Gaussian functions is used. The classification is performed on 2000 MRI images. Regarding the results, the accuracy of the DT, KNN, LDA, NB, MLP, and SVM is 93.5%, 87.6%, 61.5%, 57.5%, 68.5%, and 43.6%, respectively. Based on the results, the presented FWNNet illustrates the highest accuracy of 100% with the fractal feature extraction method and brain tumor diagnosis based on MRI images. Based on the results, the best classifier for diagnosis of the brain tumor is FWNNet architecture. However, the second and third high-performance classifiers are the DT and KNN, respectively. Moreover, the presented FWNNet method is implemented for the segmentation of brain tumors. In this paper, we present a novel supervised segmentation method based on the FWNNet layer. In the training process, input images with a sweeping filter should be reshaped to vectors that correspond to reshaped ground truth images. In the training process, we performed a PSO algorithm to optimize the gradient descent algorithm. For this purpose, 80 MRI images are used to segment the brain tumor. Based on the results of the ROC curve, it can be estimated that the presented layer can segment the brain tumor with a high true-positive rate.