forked from andabi/music-source-separation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
65 lines (58 loc) · 1.51 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
# -*- coding: utf-8 -*-
#!/usr/bin/env python
'''
By Dabi Ahn. andabi412@gmail.com.
https://www.github.com/andabi
'''
import tensorflow as tf
# TODO tf arg
# Model
class ModelConfig:
SR = 16000
L_FRAME = 1024
L_HOP = L_FRAME / 4
SEQ_LEN = 4
# Train
class TrainConfig:
CASE = str(ModelConfig.SEQ_LEN) + 'frames_ikala'
CKPT_PATH = 'checkpoints/' + CASE
GRAPH_PATH = 'graphs/' + CASE + '/train'
DATA_PATH = 'dataset/train/ikala'
LR = 0.0001
FINAL_STEP = 100000
CKPT_STEP = 500
NUM_WAVFILE = 1
SECONDS = 30
RE_TRAIN = False
session_conf = tf.ConfigProto(
device_count={'CPU': 1, 'GPU': 1},
gpu_options=tf.GPUOptions(
allow_growth=True,
per_process_gpu_memory_fraction=0.25
),
)
# TODO seperating model and case
# TODO config for each case
# Eval
class EvalConfig:
# CASE = '1frame'
# CASE = '4-frames-masking-layer'
CASE = str(ModelConfig.SEQ_LEN) + 'frames_ikala'
CKPT_PATH = 'checkpoints/' + CASE
GRAPH_PATH = 'graphs/' + CASE + '/eval'
DATA_PATH = 'dataset/eval/kpop'
# DATA_PATH = 'dataset/mir-1k/Wavfile'
# DATA_PATH = 'dataset/ikala'
GRIFFIN_LIM = False
GRIFFIN_LIM_ITER = 1000
NUM_EVAL = 9
SECONDS = 60
RE_EVAL = True
EVAL_METRIC = False
WRITE_RESULT = True
RESULT_PATH = 'results/' + CASE
session_conf = tf.ConfigProto(
device_count={'CPU': 1, 'GPU': 1},
gpu_options=tf.GPUOptions(allow_growth=True),
log_device_placement=False
)