Given the advantages of machine learning method with accuracy and high efficiency, when compared with classical numerical methods, the cell-average based neural network (CANN) method is proposed to opens up a new field for solving and simulating solutions of nonlinear Schrödinger equations numerically. Inspired by the finite volume method for solving fluid flow problems, the CANN method seeks to explore shallow and fast neural network solvers to approximate the solution average difference between two consecutive time levels. The CANN method can be considered as a time discretization scheme, which is an explicit one-step method that evolves the solution forward in time. The CANN method is a network method of the finite volume type, which means that it is mesh dependent and is a local solver. The experimental results demonstrate that the CANN method yields satisfactory outcomes at different time steps within the specified time window. Once the neural network has been effectively trained, it can be applied to solve the NLS equation with different initial conditions. Furthermore, the CANN method demonstrates strong generalization ability in processing low-quality data with noise. To enhance the utilization of the CANN method in partial differential equations, we carry out numerical experiments on the NLS equation, which show the high practicality and accuracy of this method.