class_docstr: Test case class implementing extra test functionalities.
class_docstr_tok: ["Test","case","class","implementing","extra","test","functionalities","."]
docstr: Tests that the gradient error of y=f(x) is small.
  
  Args:
    f: the function.
    x: A list of arguments for the function
    atol: Maximum absolute tolerance in gradient error.
    delta: The amount of perturbation.
docstr_tok: ["Tests","that","the","gradient","error","of","y=f","(","x",")","is","small",".","Args",":","f",":","the","function",".","x",":","A","list","of","arguments","for","the","function","atol",":","Maximum","absolute","tolerance","in","gradient","error",".","delta",":","The","amount","of","perturbation","."]
code: def assert_jacobian_is_correct_fn(self, f, x, atol=1e-6, delta=1e-6):
      """Tests that the gradient error of y=f(x) is small.
  
      Args:
        f: the function.
        x: A list of arguments for the function
        atol: Maximum absolute tolerance in gradient error.
        delta: The amount of perturbation.
      """
      # pylint: disable=no-value-for-parameter
      if tf.executing_eagerly():
          max_error = _max_error(*tf.test.compute_gradient(f, x, delta))
      else:
          with self.cached_session():
              max_error = _max_error(
                  *tf.test.compute_gradient(f, x, delta)
              )
      # pylint: enable=no-value-for-parameter
      self.assertLessEqual(max_error, atol)
  
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 9 for calling the TestCase obj's underlying member method code with example usage: obj.assert_jacobian_is_correct_fn(f, x, atol, delta) without return types