class_docstr: Tests for LBFGS optimization algorithm.
class_docstr_tok: ["Tests","for","LBFGS","optimization","algorithm","."]
code: def test_himmelblau_batch_all(self):
      @_make_val_and_grad_fn
      def himmelblau(coord):
          x, y = coord[..., 0], coord[..., 1]
          return (x * x + y - 11) ** 2 + (x + y * y - 7) ** 2
  
      dtype = "float64"
      starts = tf.constant(
          [[[1, 1], [-2, 2]], [[-1, -1], [1, -2]]], dtype=dtype
      )
      expected_minima = np.array(
          [
              [[3, 2], [-2.805118, 3.131312]],
              [[-3.779310, -3.283186], [3.584428, -1.848126]],
          ],
          dtype=dtype,
      )
      batch_results = self.evaluate(
          lbfgs.minimize(
              himmelblau,
              initial_position=starts,
              stopping_condition=bfgs_utils.converged_all,
              tolerance=1e-8,
          )
      )
  
      self.assertFalse(
          np.any(batch_results.failed)
      )  # None have failed.
      self.assertTrue(np.all(batch_results.converged))  # All converged.
  
      # All converged points are near expected minima.
      for actual, expected in zip(
          batch_results.position, expected_minima
      ):
          self.assertAllClose(actual, expected)
      self.assertEqual(batch_results.num_objective_evaluations, 36)
  
imports: from absl.testing import parameterized
  import numpy
  from scipy.stats import special_ortho_group
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.optimizer import bfgs_utils
  from tensorflow_probability.python.optimizer import lbfgs
label_desc: Use image node_id 9 for calling the LBfgsTest obj's underlying member method code with example usage: obj.test_himmelblau_batch_all() and returns: unknown