finish all the code of neural network model