-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.py
executable file
·166 lines (155 loc) · 3.65 KB
/
config.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
from datetime import datetime
from specific_config import *
import shutil
list_to_download = [
'dev-clean', 'test-clean', 'dev-other', 'test-other', 'train-clean-100', 'train-clean-360', 'train-other-500']
os.makedirs(cache_dir, exist_ok=True)
url_base = 'www.openslr.org/resources/12/'
train_set = ['train-clean-100', 'train-clean-360', 'train-other-500']
train_dev = ['dev-clean', 'dev-other']
recog_set = ['test-clean', 'test-other', 'dev-clean', 'dev-other']
fbank = {
'pre_emphasis': 0.97,
'frame_size': 0.025,
'frame_stride': 0.01,
'n_fft': 512,
'nfilt': 80,
'rate': 16000,
}
rmlsutt = {
'max_frames': 3000,
'min_frames': 10,
'max_chars': 400,
'min_chars': 0,
}
seed = 1
num_epochs = 100
CTC_LOSS_THRESHOLD = 10000
model_save_path = base_model_path + str(datetime.time(datetime.now()))
print('Model Save Path: ', model_save_path)
os.makedirs(model_save_path, exist_ok=True)
shutil.copyfile('config.py', model_save_path + '/config.py')
train_param = {
'batch_size': 10*len(num_cuda.split(',')),
'num_workers': 8*len(num_cuda.split(',')),
'lr': 4,
'adim': 256,
'transformer_warmup_steps': 25000,
'accum_grad': int(4/len(num_cuda.split(','))),
}
test_param = {
'batch_size': 1*len(num_cuda.split(',')),
'num_workers': 8*len(num_cuda.split(',')),
}
class ModelArgs:
accum_grad = 8
aconv_chans = -1
aconv_filts = 100
adim = 512 # Changed (256)
aheads = 4
apply_uttmvn = True
atype = 'dot'
awin = 5
backend = 'pytorch'
badim = 320
batch_bins = 6000000 # Changed (5992000)
batch_count = 'bin'
batch_frames_in = 0
batch_frames_inout = 0
batch_frames_out = 0
batch_size = 0
bdropout_rate = 0.0
beam_size = 4
blayers = 2
bprojs = 300
btype = 'blstmp'
bunits = 300
config = 'conf/train.yaml'
config2 = None
config3 = None
context_residual = False
criterion = 'acc'
ctc_type = 'warpctc'
ctc_weight = 0.3
debugdir = 'exp/train_960_pytorch_train_specaug'
debugmode = 1
dict = 'data/lang_char/train_960_unigram5000_units.txt'
dlayers = 6
dropout_rate = 0.1
dropout_rate_decoder = 0.0
dtype = 'lstm'
dunits = 2048
early_stop_criterion = 'validation/main/acc'
elayers = 12
elayers_sd = 4
epochs = 100
eprojs = 320
eps = 1e-08
eps_decay = 0.01
etype = 'blstmp'
eunits = 2048
fbank_fmax = None
fbank_fmin = 0.0
fbank_fs = 16000
grad_clip = 5.0
grad_noise = False
lm_weight = 0.1
lsm_type = ''
lsm_weight = 0.1
maxlen_in = 800
maxlen_out = 150
maxlenratio = 0.0
minibatches = 0
minlenratio = 0.0
model_module = 'espnet.nets.pytorch_backend.e2e_asr_transformer:E2E'
mtlalpha = 0.3
n_iter_processes = 0
n_mels = 80
nbest = 1
ngpu = 1
num_save_attention = 3
num_spkrs = 1
opt = 'noam'
outdir = 'exp/train_960_pytorch_train_specaug/results'
patience = 0
penalty = 0.0
preprocess_conf = 'conf/specaug.yaml'
ref_channel = -1
report_cer = False
report_wer = False
resume = None
rnnlm = None
rnnlm_conf = None
sampling_probability = 0.0
seed = 1
sortagrad = 0
spa = False
stats_file = None
subsample = '1'
sym_blank = '<blank>'
sym_space = '<space>'
tensorboard_dir = 'tensorboard/train_960_pytorch_train_specaug'
threshold = 0.0001
train_json = 'dump/train_960/deltafalse/data_unigram5000.json'
transformer_attn_dropout_rate = 0.0
transformer_init = 'pytorch'
transformer_input_layer = 'conv2d'
transformer_length_normalized_loss = 0
transformer_lr = 5.0
transformer_warmup_steps = 25000
use_beamformer = True
use_dnn_mask_for_wpe = False
use_frontend = False
use_wpe = False
uttmvn_norm_means = True
uttmvn_norm_vars = False
valid_json = 'dump/dev/deltafalse/data_unigram5000.json'
verbose = 0
wdropout_rate = 0.0
weight_decay = 0.0
wlayers = 2
wpe_delay = 3
wpe_taps = 5
wprojs = 300
wtype = 'blstmp'
wunits = 300