class_docstr: Tests for optimization algorithms.
docstr: Use differential evolution algorithm to minimize a quadratic function.
code: def test_differential_evolution(self):
      """Use differential evolution algorithm to minimize a 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
          )
  
      initial_population = tf.random.uniform([40, 2], seed=1243)
      results = self.evaluate(
          tff_math.optimizer.differential_evolution_minimize(
              quadratic,
              initial_population=initial_population,
              func_tolerance=1e-12,
              seed=2484,
          )
      )
      self.assertTrue(results.converged)
  
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 4 for calling the OptimizerTest obj's underlying member method code with example usage: obj.test_differential_evolution() and returns: tf