docstr: Optimizing linear residuals should give the minimum in 1 step.
docstr_tok: ["Optimizing","linear","residuals","should","give","the","minimum","in","1","step","."]
code: def test_minimize_linear_residuals_random(self):
      """Optimizing linear residuals should give the minimum in 1 step."""
      tensor_size = np.random.randint(1, 3)
      tensor_shape = np.random.randint(
          1, 10, size=(tensor_size)
      ).tolist()
      variables = np.random.uniform(
          low=-1.0, high=1.0, size=tensor_shape
      )
      objective_value, variables = levenberg_marquardt.minimize(
          lambda x: x, variables, max_iterations=1
      )
  
      with self.subTest(name="objective_value"):
          self.assertAllClose(
              objective_value, tf.zeros_like(objective_value)
          )
  
      with self.subTest(name="variables"):
          for variable in variables:
              self.assertAllClose(variable, tf.zeros_like(variable))
  
file_path: graphics/tensorflow_graphics/math/optimizer/tests/levenberg_marquardt_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from six.moves import zip
  import tensorflow
  from tensorflow_graphics.math.optimizer import levenberg_marquardt
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 6 for calling the OptimizerTest obj's underlying member method code with example usage: obj.test_minimize_linear_residuals_random() without return types