Grid-tied converters become more popular for electric vehicle, renewable energy, and energy storage systems applications. Different modulation techniques such as low-frequency (e.g., selective harmonic elimination-PWM, selective harmonic mitigation-PWM, and selective harmonic current mitigation-PWM (SHCM-PWM)) and high-frequency modulation techniques (e.g., phase shift-PWM and space vector modulation) are used in the literature for grid-tied converters. Low-frequency modulation techniques have a high-efficiency due to the low-switching power losses. One of the main challenges of low-frequency modulation techniques such as SHCM-PWM is how to implement the proposed technique in real-time, due to the transcendental Fourier equations of SHCM-PWM. In this paper, a deep learning technique (i.e., gated recurrent units) is adopted to implement the SHCM-PWM technique in real-time. To evaluate the effectiveness of the proposed learning-based technique, both simulation and experiments are performed for a single-phase 3-cell 7-level CHB converter.