class_docstr: Computes audio samples and losses.
class_docstr_tok: ["Computes","audio","samples","and","losses","."]
code: def evaluate(self, batch, outputs, losses):
      del outputs  # Unused.
      if not self._avg_losses:
          self._avg_losses = {
              name: tf.keras.metrics.Mean(name=name, dtype=tf.float32)
              for name in list(losses.keys())
          }
      # Loss.
      for k, v in losses.items():
          self._avg_losses[k].update_state(v)
  
imports: import ddsp
  from ddsp.training import heuristics
  from ddsp.training import metrics
  from ddsp.training import summaries
  import gin
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the BasicEvaluator obj's underlying member method code with example usage: obj.evaluate(batch, outputs, losses) without return types