Exemplo 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().__init__(name=name)
        self.f0_bins = f0_bins
        self.spectral_fn = spectral_fn

        # Layers.
        self.resnet = nn.ResNet(size=size)
        self.dense_out = tfkl.Dense(f0_bins)
Exemplo 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 = [tfkl.Dense(v[1]) for v in output_splits]
Exemplo n.º 3
0
  def __init__(self,
               output_splits=(('frequencies', 100 * 64),
                              ('amplitudes', 100),
                              ('noise_magnitudes', 60)),
               spectral_fn=spectral_ops.compute_logmel,
               size='tiny',
               **kwargs):
    super().__init__(output_keys=[key for key, dim in output_splits], **kwargs)
    self.output_splits = output_splits
    self.spectral_fn = spectral_fn

    # Layers.
    self.resnet = nn.ResNet(size=size)
    self.dense_outs = [tfkl.Dense(v[1]) for v in output_splits]
Exemplo n.º 4
0
    def __init__(self,
                 input_keys=('z', ),
                 output_splits=(('frequencies', 100 * 64), ('amplitudes', 100),
                                ('noise_magnitudes', 60)),
                 size='small',
                 **kwargs):
        super().__init__(input_keys=input_keys,
                         output_keys=[key for key, dim in output_splits],
                         **kwargs)
        self.output_splits = output_splits

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