class_docstr: Test case class implementing extra test functionalities.
class_docstr_tok: ["Test","case","class","implementing","extra","test","functionalities","."]
docstr: Tests that the Jacobian only contains valid values.
  
  The analytical gradients and numerical ones are expected to differ at points
  where y is not smooth. This function can be used to check that the
  analytical gradient is not NaN nor Inf.
  
  Args:
    x: A tensor.
    x_init: A numpy array containing the values at which to estimate the
      gradients of y.
    y: A tensor.
docstr_tok: ["Tests","that","the","Jacobian","only","contains","valid","values",".","The","analytical","gradients","and","numerical","ones","are","expected","to","differ","at","points","where","y","is","not","smooth",".","This","function","can","be","used","to","check","that","the","analytical","gradient","is","not","NaN","nor","Inf",".","Args",":","x",":","A","tensor",".","x_init",":","A","numpy","array","containing","the","values","at","which","to","estimate","the","gradients","of","y.","y",":","A","tensor","."]
code: def assert_jacobian_is_finite(self, x, x_init, y):
      """Tests that the Jacobian only contains valid values.
  
      The analytical gradients and numerical ones are expected to differ at points
      where y is not smooth. This function can be used to check that the
      analytical gradient is not NaN nor Inf.
  
      Args:
        x: A tensor.
        x_init: A numpy array containing the values at which to estimate the
          gradients of y.
        y: A tensor.
      """
      warnings.warn(
          (
              "assert_jacobian_is_finite is deprecated and might get "
              "removed in a future version please use assert_jacobian_is_finite_fn"
          ),
          DeprecationWarning,
      )
      if tf.executing_eagerly():
          self.skipTest(reason="Graph mode only test")
      with tf.compat.v1.Session():
          gradient = tf.compat.v1.test.compute_gradient(
              x, x.shape.as_list(), y, y.shape.as_list(), x_init
          )
          theoretical_gradient = gradient[0][0]
          self.assertFalse(
              np.isnan(theoretical_gradient).any()
              or np.isinf(theoretical_gradient).any()
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import warnings
  from absl import flags
  from absl.testing import parameterized
  import numpy
  from six.moves import zip
  import tensorflow
  from tensorflow_graphics.util import tfg_flags
label_desc: Use image node_id 10 for calling the TestCase obj's underlying member method code with example usage: obj.assert_jacobian_is_finite(x, x_init, y) without return types