Tensorflow finfo (numeric limits)
How do I access something like numpy.finfo (Or torch.finfo) in the tensorflow Python API? I want to look up things like the smallest increment or largest finite value of the given type (for example tf.float32). Some attributes are accessible directly;

tf.float32.max
&gt;&gt; -3.4028235e+38
tf.float32.min
&gt;&gt; -3.4028235e+38


But how about epsilon, infinity or similar?

I would expect a straightforward interface to c++ std::numeric_limits, but I can't seem to find it. 

You can always check this via PyTorch. Should be the same as in TF.

import torch
print(torch.finfo(torch.float16).eps) #0.0009765625
print(torch.finfo(torch.float32).eps) #1.1920928955078125e-07
print(torch.finfo(torch.float64).eps) #2.220446049250313e-16
print(torch.finfo(torch.double).eps)  #2.220446049250313e-16 


Else this will be keras epsilon way:

import tensorflow as tf
tf.keras.backend.epsilon() #1e-07


There is also set_epsilon() you can play with.
