using X y to train the NN.