Logistic regression is the industry standard in credit risk modeling. However, when the model is deployed, the lack of negative samples affects the accuracy of the model, and the nonlinear characteristics of the data itself cannot be learned. In this paper, a residual neural network combined with Gan is applied to the lending club public data set to predict credit default. Among them, the number of bad users is very small, which leads to sample imbalance, and then affects the effect of the model. For this problem, we use Gan (general adverse networks) to produce bad user samples, so that the proportion of good user samples and bad user samples reaches 1:1. Finally, the residual neural network is used to predict credit default, and the accuracy is improved by about 5% compared with logistic regression.