Beamforming (BF) design for large-scale antenna arrays with limited radio frequency chains and the phase-shifterbased analog BF architecture, has been recognized as a key issue in millimeter wave communication systems. It becomes more challenging with imperfect channel state information (CSI). In this letter, we propose a deep learning based BF design approach and develop a BF neural network (BFNN) which can be trained to learn how to optimize the beamformer for maximizing the spectral efficiency with hardware limitation and imperfect CSI. Simulation results show that the proposed BFNN achieves significant performance improvement and strong robustness to imperfect CSI over the traditional BF algorithms.Index Terms-Deep learning (DL), millimeter wave (mmWave), beamforming (BF) design, large-scale antenna arrays, neural network (NN), beamforming neural network (BFNN).