-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathhparams.py
More file actions
42 lines (35 loc) · 807 Bytes
/
hparams.py
File metadata and controls
42 lines (35 loc) · 807 Bytes
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
import tensorflow as tf
# Default hyperparameters:
hparams = tf.contrib.training.HParams(
# Audio:
num_mels=80,
num_freq=1025,
mcep_dim=24,
mcep_alpha=0.41,
minf0=40,
maxf0=500,
sample_rate=16000,
feature_type='melspc', # mcc or melspc
frame_length_ms=25,
frame_shift_ms=10,
preemphasis=0.97,
min_level_db=-100,
ref_level_db=20,
noise_injecting=True,
# Training:
use_cuda=True,
use_local_condition=True,
batch_size=8,
sample_size=16000,
learning_rate=2e-4,
training_steps=200000,
checkpoint_interval=5000,
# Model
n_stacks=11,
fft_channels=256,
quantization_channels=256,
)
def hparams_debug_string():
values = hparams.values()
hp = [' %s: %s' % (name, values[name]) for name in sorted(values)]
return 'Hyperparameters:\n' + '\n'.join(hp)