Abstract Contact binary stars are important research objects in astrophysics. The calculation speed of deriving the parameters of contact binaries with the Wilson–Devinney program and the Phoebe with Markov chain Monte Carlo (MCMC) program is relatively slow. It is unrealistic to derive the parameters in batches with the program for sky survey data. We obtain a neural network model of supervised learning with the training of synthetic light curves with Phoebe. We calculate the parameters of eight special targets from the simulated data and the Kepler data. Then, we generate the new light curve to fit the light curve of the special target base on these parameters. The correlation index R2 of the fitting result is more than 0.98. The method can be used to fit the target which has orbital inclinations greater than 50°. By fitting the Kepler data and the observed data on the ground, the method has a good generalization ability to these targets, which have some noise and some starspots. The calculation speed of one light curve with this method is less than seconds. We can derive the parameters quickly in batches to undertake some statistical work for sky survey data with the method.