summaryrefslogtreecommitdiff
path: root/app/relay/modules/samplernn.js
blob: 4181a32fdeb208ec96332b1f7f6e5d7bae5087b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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,
  }
}