divided learning time by 2 with faster tanh implementation