I can't figure out why tanh calculation has higher accuracy in tensorflow-2.2.0 as compare to numpy. Please have a look at example below.
I appreciate your time and reply.
Thanks,
I can't figure out why tanh calculation has higher accuracy in tensorflow-2.2.0 as compare to numpy. Please have a look at example below.
I appreciate your time and reply.
Thanks,
The NumPy result is more accurate. For comparision, Wolfram Alpha gives the result 0.745967716740428007413668705771485305302298638189343426746...
NumPy uses 64 bit floating point (i.e. double precision) by default, while tensorflow uses 32 bit floating point (i.e. single precision).