One of the fundamental applications of artificial neural networks is solving Partial Differential Equations (PDEs) which has been considered in this paper. We have created an effective method by combining the spectral methods and multi-layer perceptron to solve Generalized Fitzhugh–Nagumo (GFHN) equation. In this method, we have used Chebyshev polynomials as activation functions of the multi-layer perceptron. In order to solve PDEs, independent variables, which are collocation points, have been used as input dataset. Furthermore, the loss function has been constructed from the residual of the equation and its boundary condition. Minimizing the loss function has adjusted the appropriate values for the parameters of the network. Hence, the network has shown an outstanding performance not only on the training dataset but also on the Unseen data. Some numerical examples and a comparison between the results of our proposed method and other existing approaches have been provided to show the efficiency and accuracy of the proposed method. For this purpose different cases such as linear, nonlinear and multi dimensional equations are considered.