class_docstr: Tests for _compute_gradients method.
class_docstr_tok: ["Tests","for","_compute_gradients","method","."]
docstr: Loss function whose derivative w.r.t val1 is val1 - val0.
code: def _loss(self, val0, val1):
      """Loss function whose derivative w.r.t val1 is val1 - val0."""
      return 0.5 * tf.reduce_sum(
          input_tensor=tf.math.squared_difference(val0, val1), axis=1
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras
  from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras_vectorized
label_desc: Use image node_id 1 for calling the DPTreeAggregationOptimizerComputeGradientsTest obj's underlying member method code with example usage: obj._loss(val0, val1) and returns: unknown