In order to obtain beamforming gains and prevent high pathloss in millimeter wave (mmWave) systems, large number of antennas is employed. Digital precoders are difficult to implement with many antennas because of hardware constraints, while analog precoders have limited performance. In this paper, hybrid precoding based on a deep learning framework, HybridPrecodingNet, is proposed, which uses largescale information to predict the parameters of hybrid precoders and decoders. The statistics of the channel covariance matrix are applied to design the hybrid precoders and decoders. The proposed HybridPrecodingNet at the receiver is applied for the channel estimation and design of hybrid decoders. In our proposed framework, the structure of HybridPrecodingNet is trained to learn how to optimize the hybrid precoder and decoder for maximum spectral efficiency. Comparison between different precoding techniques is provided. Results show that HybridPrecodingNet approaches the sub-optimal solution and gives significant spectral efficiency enhancement.