tfm.optimization.math.isfinite

Return True if x is neither an infinity nor a NaN, and False otherwise.