class_docstr: Tests for Differential Evolution optimization algorithm.
class_docstr_tok: ["Tests","for","Differential","Evolution","optimization","algorithm","."]
docstr: Can minimize a two dimensional quadratic function.
docstr_tok: ["Can","minimize","a","two","dimensional","quadratic","function","."]
code: def test_quadratic_bowl_2d(self):
      """Can minimize a two dimensional quadratic function."""
      minimum = np.array([1.0, 1.0])
      scales = np.array([2.0, 3.0])
  
      def quadratic(x):
          return tf.reduce_sum(
              scales * tf.math.squared_difference(x, minimum), axis=-1
          )
  
      start = tf.constant([0.6, 0.8])
      results = self.evaluate(
          differential_evolution.minimize(
              quadratic,
              initial_position=start,
              func_tolerance=1e-12,
              seed=1234,
          )
      )
      self.assertTrue(results.converged)
      self.assertArrayNear(results.position, minimum, 1e-6)
  
file_path: probability/tensorflow_probability/python/optimizer/differential_evolution_test.py
imports: import numpy
  from scipy.stats import special_ortho_group
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.optimizer import differential_evolution
label_desc: Use image node_id 1 for calling the DifferentialEvolutionTest obj's underlying member method code with example usage: obj.test_quadratic_bowl_2d() and returns: tf