Ejemplo n.º 1
0
  def __init__(self,
               size='large',
               f0_bins=128,
               spectral_fn=lambda x: spectral_ops.compute_mag(x, size=1024),
               name='resnet_f0_encoder'):
    super(ResnetF0Encoder, self).__init__(name=name)
    self.f0_bins = f0_bins
    self.spectral_fn = spectral_fn

    # Layers.
    self.resnet = nn.resnet(size=size)
    self.dense_out = nn.dense(f0_bins)
Ejemplo n.º 2
0
    def __init__(self,
                 output_splits=(('frequencies', 100 * 64), ('amplitudes', 100),
                                ('noise_magnitudes', 60)),
                 spectral_fn=spectral_ops.compute_logmel,
                 size='tiny',
                 name='resnet_sinusoidal_encoder'):
        super().__init__(name=name)
        self.output_splits = output_splits
        self.spectral_fn = spectral_fn

        # Layers.
        self.resnet = nn.resnet(size=size)
        self.dense_outs = [nn.dense(v[1]) for v in output_splits]