class_docstr: Tests for optimization algorithms.
docstr: Use BFGS algorithm to find all four minima of Himmelblau's function.
code: def test_bfgs_minimize(self):
      """Use BFGS algorithm to find all four minima of Himmelblau's function."""
  
      @tff_math.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
  
      start = tf.constant(
          [[1, 1], [-2, 2], [-1, -1], [1, -2]], dtype="float64"
      )
  
      results = self.evaluate(
          tff_math.optimizer.bfgs_minimize(
              himmelblau,
              initial_position=start,
              stopping_condition=tff_math.optimizer.converged_all,
              tolerance=1e-8,
          )
      )
  
      expected_minima = np.array(
          [
              [3, 2],
              [-2.805118, 3.131312],
              [-3.779310, -3.283186],
              [3.584428, -1.848126],
          ]
      )
  
      self.assertTrue(results.converged.all())
      self.assertEqual(results.position.shape, expected_minima.shape)
      self.assertNDArrayNear(results.position, expected_minima, 1e-5)
  
file_path: tf-quant-finance/tf_quant_finance/math/optimizer/optimizer_test.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the OptimizerTest obj's underlying member method code with example usage: obj.test_bfgs_minimize() and returns: unknown