class_docstr: Tests for LBFGS optimization algorithm.
class_docstr_tok: ["Tests","for","LBFGS","optimization","algorithm","."]
docstr: Can minimize a high-dimensional trivial bowl (sphere).
docstr_tok: ["Can","minimize","a","high-dimensional","trivial","bowl","(","sphere",")","."]
code: def test_high_dims_quadratic_bowl_trivial(self):
      """Can minimize a high-dimensional trivial bowl (sphere)."""
      ndims = 100
      minimum = np.ones([ndims], dtype="float64")
      scales = np.ones([ndims], dtype="float64")
  
      @_make_val_and_grad_fn
      def quadratic(x):
          return tf.reduce_sum(
              scales * tf.math.squared_difference(x, minimum)
          )
  
      start = np.zeros([ndims], dtype="float64")
      results = self.evaluate(
          lbfgs.minimize(
              quadratic, initial_position=start, tolerance=1e-8
          )
      )
      self.assertTrue(results.converged)
      self.assertEqual(
          results.num_iterations, 1
      )  # Solved by first line search.
      self.assertLessEqual(_norm(results.objective_gradient), 1e-8)
      self.assertArrayNear(results.position, minimum, 1e-5)
  
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 3 for calling the LBfgsTest obj's underlying member method code with example usage: obj.test_high_dims_quadratic_bowl_trivial() and returns: tf