Machine learning brings a new paradigm to the traditional structural modal parameter identification problem. In this study, we propose a novel machine learning method for stochastic subspace identification (SSI) problem. The proposed method embeds the mathematical characteristics of modal identification into a neural network and formalizes the modal identification into optimization problem of deep neural networks (DNN). The network optimization process is the process of obtaining modal parameters, which can be implemented in a relatively autonomous manner with little manual intervention. The designed modal identification network includes two sub-neural-networks: a model order determination neural network and modal identification neural network. In the model order determination neural network, the singular values of the Toeplitz matrix, which is constructed by output covariance matrices are fed into the network, and the designed network can automatically determine the model order by the designed loss function. In the modal identification neural network, the SSI principles are informed into the neural network, and the designed network is used to identify the modal parameters which optimizes the designed loss function to obtain the system matrix and output matrix. The examples of a numerical simulation and two actual bridges are used to illustrate the ability of the proposed method. Results show that the proposed method is capable of operating automatically to extract modal information from structural responses with stronger anti-interference ability and the identified number of accurate modes are obviously increased.