forked from funcwj/conv-tasnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
53 lines (47 loc) · 951 Bytes
/
conf.py
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
fs = 8000
chunk_len = 4 # (s)
chunk_size = chunk_len * fs
num_spks = 2
# network configure
nnet_conf = {
"L": 20,
"N": 256,
"X": 8,
"R": 4,
"B": 256,
"H": 512,
"P": 3,
"norm": "BN",
"num_spks": num_spks,
"non_linear": "relu"
}
# data configure:
train_dir = "data/wsj0_2mix/tr/"
dev_dir = "data/wsj0_2mix/cv/"
train_data = {
"mix_scp":
train_dir + "mix.scp",
"ref_scp":
[train_dir + "spk{:d}.scp".format(n) for n in range(1, 1 + num_spks)],
"sample_rate":
fs,
}
dev_data = {
"mix_scp": dev_dir + "mix.scp",
"ref_scp":
[dev_dir + "spk{:d}.scp".format(n) for n in range(1, 1 + num_spks)],
"sample_rate": fs,
}
# trainer config
adam_kwargs = {
"lr": 1e-3,
"weight_decay": 1e-5,
}
trainer_conf = {
"optimizer": "adam",
"optimizer_kwargs": adam_kwargs,
"min_lr": 1e-8,
"patience": 2,
"factor": 0.5,
"logging_period": 200 # batch number
}