class_docstr: Tests for LBFGS optimization algorithm.
class_docstr_tok: ["Tests","for","LBFGS","optimization","algorithm","."]
code: def test_initial_position_and_previous_optimizer_results_are_exclusive(
      self,
  ):
      minimum = np.array([1.0, 1.0])
      scales = np.array([2.0, 3.0])
  
      @_make_val_and_grad_fn
      def quadratic(x):
          return tf.reduce_sum(
              scales * tf.math.squared_difference(x, minimum)
          )
  
      start = tf.constant([0.6, 0.8])
  
      def run(position, state):
          raw_results = lbfgs.minimize(
              quadratic,
              initial_position=position,
              previous_optimizer_results=state,
              tolerance=1e-8,
          )
          self.evaluate(raw_results)
          return raw_results
  
      self.assertRaises(ValueError, run, None, None)
      results = run(start, None)
      self.assertRaises(ValueError, run, start, results)
  
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 12 for calling the LBfgsTest obj's underlying member method code with example usage: obj.test_initial_position_and_previous_optimizer_results_are_exclusive() and returns: tf, raw_results