Update NeuralNetworkEvaluator.java

replace (1d - Math.exp(-2d * z)) / (1d + Math.exp(-2d * z)) with Math.tanh(z); 

Math.tanh() is a more robust method to calculate the tanh value. For example when z = -512, (1d - Math.exp(-2d * z)) / (1d + Math.exp(-2d * z)) will return NAN whileMath.tanh() will return -1.