class_docstr: Tests for Differential Evolution optimization algorithm.
class_docstr_tok: ["Tests","for","Differential","Evolution","optimization","algorithm","."]
docstr: Can minimize the square root function.
docstr_tok: ["Can","minimize","the","square","root","function","."]
code: def test_sqrt_quadratic_function(self):
      """Can minimize the square root function."""
      minimum = np.array([0.0, 0.0, 0.0, 0.0])
  
      def sqrt_quad(x):
          return tf.sqrt(tf.reduce_sum(x**2, axis=-1))
  
      start = tf.constant([1.2, 0.4, -1.8, 2.9])
      results = self.evaluate(
          differential_evolution.minimize(
              sqrt_quad,
              initial_position=start,
              func_tolerance=1e-12,
              max_iterations=200,
              seed=1230,
          )
      )
      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 6 for calling the DifferentialEvolutionTest obj's underlying member method code with example usage: obj.test_sqrt_quadratic_function() and returns: tf