This paper investigates the secure transmission for intelligent reflecting surface (IRS) assisted wireless communication systems. Our aim is to maximize the secure energy efficiency of the system via jointly optimizing the IRS phase reflector as well as the number of IRS elements. To solve this non-convex maximization problem, a deep learning (DL) based algorithm is proposed. The proposed deep neural network has fully connected layers and can predict the optimal IRS reflection vector and the optimal number of IRS reflection elements with low complexity. Simulation results show that the proposed DL method achieves higher secure energy efficiency than the conventional methods.