neural network implementation of hyperbolic tangent