(features, labels, frame_probs, onset_probs,
                           frame_predictions, onset_predictions,
                           offset_predictions, velocity_values, hparams)
return metric_ops
Generate drum metrics: offsets/frames are ignored.
Generate drum metrics: offsets/frames are ignored.
Generate drum metrics : offsets / frames are ignored .
def _drums_only_metric_ops(features, labels, frame_probs, onset_probs,
                           frame_predictions, onset_predictions,
                           offset_predictions, velocity_values, hparams):
  """Generate drum metrics: offsets/frames are ignored."""
  del frame_predictions, offset_predictions  # unused

  metric_ops = metrics.define_metrics(
      frame_probs=frame_probs,
      onset_probs=onset_probs,
      frame_predictions=onset_predictions,
      onset_predictions=onset_predictions,
      offset_predictions=onset_predictions,
      velocity_values=velocity_values,
      length=features.length,
      sequence_label=labels.note_sequence,
      frame_labels=labels.labels,
      sequence_id=features.sequence_id,
      hparams=hparams,
      min_pitch=constants.MIN_MIDI_PITCH,
      max_pitch=constants.MAX_MIDI_PITCH,
      prefix='drums/',
      onsets_only=True,
      pitch_map=drum_mappings.GROOVE_PITCH_NAMES)
  return metric_ops
def _drums_only_metric_ops ( features , labels , frame_probs , onset_probs , frame_predictions , onset_predictions , offset_predictions , velocity_values , hparams ) : del frame_predictions , offset_predictions # unused metric_ops = metrics . define_metrics ( frame_probs = frame_probs , onset_probs = onset_probs , frame_predictions = onset_predictions , onset_predictions = onset_predictions , offset_predictions = onset_predictions , velocity_values = velocity_values , length = features . length , sequence_label = labels . note_sequence , frame_labels = labels . labels , sequence_id = features . sequence_id , hparams = hparams , min_pitch = constants . MIN_MIDI_PITCH , max_pitch = constants . MAX_MIDI_PITCH , prefix = 'drums/' , onsets_only = True , pitch_map = drum_mappings . GROOVE_PITCH_NAMES ) return metric_ops