X-ray imaging with grating interferometry (GI) can obtain additional phase and dark-field contrasts simultaneously with the traditional absorption contrast. Due to higher sensitivity of phase contrast and subpixel spatial resolution of dark-field contrast, this technique has been established as a promising technique for low-density materials imaging. The information retrieval algorithm of three contrasts plays the key role in applications of the technique. The existing algorithms can be divided into two major types, the cosine-model analysis (CMA) method and the small angle x-ray scattering (SAXS) method. However, CMA method is established on the approximate cosine-model assumption and SAXS method requires relatively complicated and time-consuming iteration process of deconvolution. To overcome the aforementioned limitations, we introduce the convolution neural network (CNN) technique for the first time. With collected detector data as the input and retrieved information via SAXS method as the label, we design two CNN architectures. We train every network with 2160 exposure images of 6 breast specimen and test on another 720 images of 2 breast specimen. With structural similarity (SSIM) index as the quantitative standard, the results indicate retrieved images via the much faster CNN algorithms are consistent with SAXS method (best SSIM values are 0.9852, 0.9760 and 0.9006 respectively for absorption, phase and dark-field contrasts).