TanSigmoidActivationFunction implementation.