It is well known that source deghosting can best be applied to common-receiver gathers, while receiver deghosting can best be applied to common-shot records. The source-ghost wavefield observed in the common-shot domain contains the imprint of the subsurface, which complicates source deghosting in common-shot domain, in particular when the subsurface is complex. Unfortunately, the alternative, i.e., the common-receiver domain, is often coarsely sampled, which complicates source deghosting in this domain as well. To solve the latter issue, we propose to train a convolutional neural network to apply source deghosting in this domain. We subsample all shot records with and without the receiver ghost wavefield to obtain the training data. Due to reciprocity this training data is a representative data set for source deghosting in the coarse common-receiver domain. We validate the machine-learning approach on simulated data and on field data. The machine learning approach gives a significant uplift to the simulated data compared to conventional source deghosting. The field-data results confirm that the proposed machine-learning approach is able to remove the source-ghost wavefield from the coarsely-sampled common-receiver gathers.