How to use the ddsp.archis.construct_synth function in ddsp

To help you get started, we’ve selected a few ddsp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github acids-ircam / ddsp_pytorch / code / train.py View on Github external
plot_batch_detailed(fixed_batch)
# Set latent dims to output dims
if (args.latent_dims == 0):
    args.latent_dims = args.output_size

"""
###################
Model definition section
###################
"""
print('[Creating model]')
if (args.model in ['ae', 'vae', 'wae', 'flow']):
    # Construct encoding and decoding architectures
    encoder, decoder = construct_architecture(args)
    # Construct synthesizer
    synth = construct_synth(args)
    # Finally construct the full model (first only AE)
    model = DDSSynth(encoder, decoder, synth, args)
else:
    raise Exception('Unknown model ' + args.model)
# Send model to device
model = model.to(args.device)

"""
###################
Optimizer section
###################
"""
# Optimizer model
optimizer = optim.Adam(model.parameters(), lr=args.lr)
# Learning rate scheduler
scheduler = optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode='min', factor=0.5, patience=20, verbose=True, threshold=1e-7)

ddsp

Differentiable Digital Signal Processing

Apache-2.0
Latest version published 12 months ago

Package Health Score

68 / 100
Full package analysis