class_docstr: Tests dp_optimizer_keras_sparse optimizers.
class_docstr_tok: ["Tests","dp_optimizer_keras_sparse","optimizers","."]
docstr: Loss function whose derivative w.r.t val1 is val1 - val0.
docstr_tok: ["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_privacy.privacy.optimizers import dp_optimizer_keras_sparse
label_desc: Use image node_id 1 for calling the DPOptimizerTest obj's underlying member method code with example usage: obj._loss(val0, val1) and returns: unknown