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)
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]
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]
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]