the printing here is not for debugging purposes, it has to be available in release builds as it is very useful to look at the error while training the neural network.