class_docstr: Helper object for computing f0 encoder metrics.
class_docstr_tok: ["Helper","object","for","computing","f0","encoder","metrics","."]
code: def __init__(
      self, sample_rate, frame_rate, rpa_tolerance=50, name="f0"
  ):
      super().__init__(
          sample_rate=sample_rate, frame_rate=frame_rate, name=name
      )
      self._metrics = {
          "f0_dist": tf.keras.metrics.Mean("f0_dist"),
          "raw_pitch_accuracy": tf.keras.metrics.Mean(
              "raw_chroma_accuracy"
          ),
          "raw_chroma_accuracy": tf.keras.metrics.Mean(
              "raw_pitch_accuracy"
          ),
      }
      self._rpa_tolerance = rpa_tolerance
  
imports: import dataclasses
  from absl import logging
  import ddsp
  import librosa
  import mir_eval
  import note_seq
  from note_seq import sequences_lib
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new F0Metrics object from inherited base classes: BaseMetrics with example: obj = F0Metrics(sample_rate, frame_rate, rpa_tolerance, name)