In this paper, a robust transmit power control scheme is proposed for multi-channel underlay device-to-device (D2D) communications with imperfect channel state information (CSI). The transmit power of the D2D user equipment (DUE) on each channel is optimized to maximize the average spectral efficiency (SE) whilst maintaining the quality-of-service (QoS) of the cellular user equipment (CUE) in the presence of errors in the CSI. To this end, we propose a novel deep neural network (DNN) structure and training methodology, in which artificially distorted CSI is used to compensate for the effect of imperfect CSI, such that a robust transmit power control strategy against channel error can be derived. Our simulation results show that even when the CSI is inaccurate, in our proposed scheme the degradation of the average SE can be kept low whilst maintaining negligible QoS violation, thereby confirming its effectiveness and robustness.