class_docstr: Predicts harmonic controls from sinusoidal controls.
  
  EXPERIMENTAL
docstr: Constructor.
docstr_tok: ["Constructor","."]
code: def __init__(
      self,
      net=None,
      n_harmonics=100,
      f0_depth=64,
      amp_scale_fn=ddsp.core.exp_sigmoid,
      # pylint: disable=g-long-lambda
      freq_scale_fn=lambda x: ddsp.core.frequencies_softmax(
          x, depth=64, hz_min=20.0, hz_max=1200.0
      ),
      # pylint: enable=g-long-lambda
      sample_rate=16000,
      **kwargs,
  ):
      """Constructor."""
      super().__init__(**kwargs)
      self.n_harmonics = n_harmonics
      self.amp_scale_fn = amp_scale_fn
      self.freq_scale_fn = freq_scale_fn
      self.sample_rate = sample_rate
  
      # Layers.
      self.net = net
      self.amp_out = tfkl.Dense(1)
      self.hd_out = tfkl.Dense(n_harmonics)
      self.f0_out = tfkl.Dense(f0_depth)
  
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 1 to create a new SinusoidalToHarmonicEncoder object from inherited base classes: nn with example: obj = SinusoidalToHarmonicEncoder(net, n_harmonics, f0_depth, amp_scale_fn, freq_scale_fn, sample_rate)