class_docstr: Predicts harmonic controls from sinusoidal controls.
  
  EXPERIMENTAL
docstr: Converts (sin_freqs, sin_amps) to (f0, amp, hd).
  
  Args:
    sin_freqs: Sinusoidal frequencies in Hertz, of shape
      [batch, time, n_sinusoids].
    sin_amps: Sinusoidal amplitudes, linear scale, greater than 0, of shape
      [batch, time, n_sinusoids].
  
  Returns:
    f0: Fundamental frequency in Hertz, of shape [batch, time, 1].
    amp: Amplitude, linear scale, greater than 0, of shape [batch, time, 1].
    hd: Harmonic distribution, linear scale, greater than 0, of shape
      [batch, time, n_harmonics].
docstr_tok: ["Converts","(","sin_freqs",",","sin_amps",")","to","(","f0",",","amp",",","hd",")",".","Args",":","sin_freqs",":","Sinusoidal","frequencies","in","Hertz",",","of","shape","[","batch",",","time",",","n_sinusoids","]",".","sin_amps",":","Sinusoidal","amplitudes",",","linear","scale",",","greater","than","0",",","of","shape","[","batch",",","time",",","n_sinusoids","]",".","Returns",":","f0",":","Fundamental","frequency","in","Hertz",",","of","shape","[","batch",",","time",",","1","]",".","amp",":","Amplitude",",","linear","scale",",","greater","than","0",",","of","shape","[","batch",",","time",",","1","]",".","hd",":","Harmonic","distribution",",","linear","scale",",","greater","than","0",",","of","shape","[","batch",",","time",",","n_harmonics","]","."]
code: def call(
      self, sin_freqs, sin_amps
  ) -> ["harm_amp", "harm_dist", "f0_hz"]:
      """Converts (sin_freqs, sin_amps) to (f0, amp, hd).
  
      Args:
        sin_freqs: Sinusoidal frequencies in Hertz, of shape
          [batch, time, n_sinusoids].
        sin_amps: Sinusoidal amplitudes, linear scale, greater than 0, of shape
          [batch, time, n_sinusoids].
  
      Returns:
        f0: Fundamental frequency in Hertz, of shape [batch, time, 1].
        amp: Amplitude, linear scale, greater than 0, of shape [batch, time, 1].
        hd: Harmonic distribution, linear scale, greater than 0, of shape
          [batch, time, n_harmonics].
      """
      # Scale the inputs.
      nyquist = self.sample_rate / 2.0
      sin_freqs_unit = ddsp.core.hz_to_unit(
          sin_freqs, hz_min=0.0, hz_max=nyquist
      )
  
      # Combine.
      x = tf.concat([sin_freqs_unit, sin_amps], axis=-1)
  
      # Run it through the network.
      x = self.net(x)
      x = x["out"] if isinstance(x, dict) else x
  
      # Output layers.
      harm_amp = self.amp_out(x)
      harm_dist = self.hd_out(x)
      f0 = self.f0_out(x)
  
      # Output scaling.
      harm_amp = self.amp_scale_fn(harm_amp)
      harm_dist = self.amp_scale_fn(harm_dist)
      f0_hz = self.freq_scale_fn(f0)
  
      # Filter harmonic distribution for nyquist.
      harm_freqs = ddsp.core.get_harmonic_frequencies(
          f0_hz, self.n_harmonics
      )
      harm_dist = ddsp.core.remove_above_nyquist(
          harm_freqs, harm_dist, self.sample_rate
      )
      harm_dist = ddsp.core.safe_divide(
          harm_dist, tf.reduce_sum(harm_dist, axis=-1, keepdims=True)
      )
  
      return (harm_amp, harm_dist, f0_hz)
  
imports: import ddsp
  from ddsp import spectral_ops
  from ddsp.training import nn
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the SinusoidalToHarmonicEncoder obj's underlying member method code with example usage: obj.call(sin_freqs, sin_amps) and returns: harm_amp,  harm_dist,  f0_hz