From a450fa75edb927b7568b8a3198f9209c6a4c7f79 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 3 Jun 2018 14:46:18 +0200 Subject: adjusting the form, calling samplernn tasks --- app/relay/modules/samplernn.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'app/relay/modules/samplernn.js') diff --git a/app/relay/modules/samplernn.js b/app/relay/modules/samplernn.js index 3cef25d..8b3b8e6 100644 --- a/app/relay/modules/samplernn.js +++ b/app/relay/modules/samplernn.js @@ -16,35 +16,29 @@ const train = { script: 'train.py', params: (task) => { return [ - '--exp', task.checkpoint, + '--exp', task.dataset, '--dataset', task.dataset, '--frame_sizes', '8', '2', '--n_rnn', '2', - '--epoch_limit', task.opt.epoch_limit, - '--sample_length', task.opt.sample_length, - '--n_samples', task.opt.n_samples, + '--epoch_limit', task.epochs || 4, + '--sample_length', task.opt.sample_length || 44100 * 5, + '--n_samples', task.opt.n_samples || 6, '--keep_old_checkpoints', task.opt.keep_old_checkpoints ? 'True' : 'False', ] }, onComplete: publish, } -const report = { - type: 'perl', - script: 'latest.pl', - params: ['-v'], - isScript: true, -} const generate = { type: 'pytorch', script: 'generate.py', params: (task) => { return [ - '--exp', task.checkpoint, + '--exp', task.dataset, '--dataset', task.dataset, '--frame_sizes', '8', '2', '--n_rnn', '2', - '--sample_length', task.opt.sample_length, - '--n_samples', task.opt.n_samples, + '--sample_length', task.opt.sample_length || 44100 * 5, + '--n_samples', task.opt.n_samples || 6, '--keep_old_checkpoints', task.opt.keep_old_checkpoints ? 'True' : 'False', ] }, @@ -55,9 +49,14 @@ const publish = { script: 'latest.pl', params: (task) => { return ['-l', task.dataset] - } + } +} +const report = { + type: 'perl', + script: 'latest.pl', + params: ['-v'], + isScript: true, } -// after train and generate, run perl latest.pl -l $checkpoint_name export default { name, cwd, -- cgit v1.2.3-70-g09d2