A novel neural network method is developed for solving systems of conservation laws whose solutions may contain abrupt changes of state, including shock waves and contact discontinuities. In conventional approaches, a low-cost solution patch is usually used as the input to a neural network for predicting the high-fidelity solution patch. With that technique, however, there is no way to distinguish a smeared discontinuity from a smooth solution with large gradient in the input, and the two almost identical inputs correspond to two fundamentally different high-fidelity solution patches in training and predicting. To circumvent this difficulty, we use local patches of two low-cost numerical solutions of the conservation laws in a converging sequence as the input to a neural network. The neural network then makes a correct prediction by identifying whether the solution contains discontinuities or just smooth variations with large gradients, because the former becomes increasingly steep in a converging sequence in the input, and the latter does not. The inputs can be computed from low-cost numerical schemes with coarse resolution, in a local domain of dependence of a space-time location where the prediction is to be made. Despite smeared input solutions, the output provides sharp approximations of solutions containing shock waves and contact discontinuities. The method works effectively not only for regions with discontinuities, but also for smooth regions of the solution. It is efficient to implement, once trained, and has broader applications for different types of differential equations.