In this paper, we use CGAN (conditional generative adversarial network) to model the fiber-optic channel and the performance is similar with the conventional method, SSFM (split-step Fourier method), while the running time is reduced from several minutes to about 2 seconds at 80-km distance.