The electrical activity of the diaphragm (EAdi) is a novel monitoring parameter for patients under assisted ventilation and is used for assessing the patient's neural respiratory drive. It is recorded by an array of electrodes placed inside the esophagus at the level of the diaphragm. A noninvasive alternative is the measurement of the electromyogram by means of skin surface electrodes (sEMG). The respiratory sEMG signal, however, is subject to electrocardiographic interference and crosstalk from other muscles and may also pick up a different part of the muscular activity. In this work, we propose to use a deep neural network to predict the electrical activity of the diaphragm as measured by a nasogastric catheter from sEMG measurements. We use a ResNet based architecture and train the network to directly regress the EAdi as a supervised learning task - we further investigate a heatmap based regression approach. The proposed methods are evaluated on a clinical dataset consisting of 77 recordings from mechanically ventilated patients. For the direct regression task, the network's predictions reach a Pearson correlation coefficient (PCC) of 0.818 with EAdi on the hold-out set. The heatmap regression increases the PCC to 0.830 while at the same time achieving a lower mean absolute error, indicating a superior performance. From our results we conclude that sEMG measurements may be used to predict the internal activity of the diaphragm as measured invasively using a nasogastric catheter.