-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGSC_hparams.py
52 lines (46 loc) · 1.5 KB
/
GSC_hparams.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
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
def create_hparams():
"""Create model hyperparameters"""
hparams = AttrDict({
################################
# Experiment Parameters #
################################
"epochs":200,
"iters_per_checkpoint":1000,
"seed":1234,
"fp16_run":False,
"cudnn_enabled":True,
"cudnn_benchmark":False,
"ignore_layers":['embedding.weight'],
################################
# Data Parameters #
################################
"training_files":'training',
"validation_files":'validation',
"n_frames_per_utt": 60,
"n_labels": 35,
################################
# Audio Parameters #
################################
"sample_rate":16000,
"n_fft":1024,
"hop_length":256,
"win_length":1024,
"n_mels":80,
"f_min":0.0,
"f_max":8000.0,
"mel_normalized":True,
################################
# Optimization Hyperparameters #
################################
"use_saved_learning_rate":False,
"learning_rate":1e-3,
"weight_decay":1e-6,
"grad_clip_thresh":1.0,
"batch_size":1024,
"mask_padding":True # set model's padded outputs to padded values
})
return hparams