I am training a neural network model in R but the solutions are not converging during training. so as a result i am not getting the desired output during prediction (r2 coming below 1). Can anyone tell me how can I get a better training model? and if anyone can provide me a modified code of neural net in R?