In this paper, we develop cell-average based neural network (CANN) method to approximate solutions of nonlinear Cahn–Hilliard equation and Camassa-Holm equation. The CANN method is motivated by the finite volume scheme and evolved from the integral or weak formulation of partial differential equations. The major idea of cell-average based neural network method is to explore a neural network to approximate the solution average difference or evolution between two neighboring time steps. Unlike traditional numerical methods, CANN method is not limited by the CFL restriction and can adapt large time steps for solution evolution, which is a significant advantage that classical numerical methods do not have. Once well trained, this method can be implemented as an fixed explicit finite volume scheme and applied to certain groups of initial value conditions for Cahn–Hilliard equation and Camassa-Holm equation without retraining the neural network. Furthermore, the CANN method also performs very well in handling data with corruption or low quality data generated by Gaussian white noise. Numerical examples are presented to demonstrate effectiveness, accuracy and capability of the proposed method.