message: Add a small example for compute_gradient
diff: @@ -295,7 +295,7 @@ def _compute_gradient_list(f, xs, delta):
  @tf_export("test.compute_gradient", v1=[])
  def compute_gradient(f, x, delta=1e-3):
  - """Computes the theoretical and numeric Jacobian of f.
  + """Computes the theoretical and numeric Jacobian of `f`.
  With y = f(x), computes the theoretical and numeric Jacobian dy/dx.
  @@ -313,6 +313,16 @@ def compute_gradient(f, x, delta=1e-3):
  Raises:
  ValueError: If result is empty but the gradient is nonzero.
  + ValueError: If x is not list, but any other type.
  +
  + ```python
  + @tf.function
  + def test_func(x):
  + return x*x
  +
  + theoretical, numerical = tf.test.compute_gradient(test_func, [1.0])
  + theoretical, numerical
  + ```
  """
  if not isinstance(x, list):
  raise ValueError(
  