add read training data from file function for neural network