This paper extends a method, called bilinear neural network method (BNNM), to solve exact solutions to nonlinear partial differential equation. New, test functions are constructed by using this method. These test functions are composed of specific activation functions of single-layer model, specific activation functions of “2-2” model and arbitrary functions of “2-2-3” model. By means of the BNNM, nineteen sets of exact analytical solutions and twenty-four arbitrary function solutions of the dimensionally reduced p-gBKP equation are obtained via symbolic computation with the help of Maple. The fractal solitons waves are obtained by choosing appropriate values and the self-similar characteristics of these waves are observed by reducing the observation range and amplifying the partial picture. By giving a specific activation function in the single layer neural network model, exact periodic waves and breathers are obtained. Via various three-dimensional plots, contour plots and density plots, the evolution characteristic of these waves are exhibited.