summaryrefslogtreecommitdiff
path: root/app/relay/modules/samplernn.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/relay/modules/samplernn.js')
-rw-r--r--app/relay/modules/samplernn.js61
1 files changed, 61 insertions, 0 deletions
diff --git a/app/relay/modules/samplernn.js b/app/relay/modules/samplernn.js
new file mode 100644
index 0000000..4181a32
--- /dev/null
+++ b/app/relay/modules/samplernn.js
@@ -0,0 +1,61 @@
+import path from 'path'
+
+const name = 'samplernn'
+const cwd = process.env.TEST_CWD || path.join(process.env.HOME, 'code/' + name + '/')
+
+const fetch = {
+ type: 'perl',
+ script: 'get.pl',
+ params: (task) => {
+ }
+ // perl get.pl url
+}
+const dataset = {
+ type: 'perl',
+ script: 'dataset.pl',
+ params: (task) => {
+ }
+ // perl dataset.pl filename.flac
+}
+const train = {
+ type: 'pytorch',
+ script: 'train.py',
+ params: (task) => {
+ },
+ onComplete: publish,
+ // python train.py \
+ // --exp $checkpoint_name --dataset $dataset_name \
+ // --frame_sizes 8 2 --n_rnn 2 \
+ // --sample_length $sample_length \
+ // --n_samples $n_samples \
+ // --keep_old_checkpoints False \
+ // --epoch_limit $epoch_limit \
+}
+const generate = {
+ type: 'pytorch',
+ script: 'generate.py',
+ params: (task) => {
+ },
+ onComplete: publish,
+ // python generate.py \
+ // --exp $checkpoint_name --dataset $dataset_name \
+ // --frame_sizes 8 2 --n_rnn 2 \
+ // --sample_length $sample_length \
+ // --n_samples $n_samples \
+ // --keep_old_checkpoints False \
+ // --epoch_limit $epoch_limit \
+}
+const publish = {
+ type: 'perl',
+ script: 'latest.pl',
+ params: (task) => {
+ }
+}
+// after train and generate, run perl latest.pl -l $checkpoint_name
+
+export default {
+ name, cwd,
+ activities: {
+ dataset, train, generate,
+ }
+}