Neural network application to the inverse scattering problem in high-resolution X-ray diffraction