-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_stage1.py
23 lines (20 loc) · 1.16 KB
/
run_stage1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import configparser
"""
stage 1: use stage 0 model to start with,
train model on curated training data,
trained model will be saved in path defined in config ['SaveModel']['stage1_model']
"""
config=configparser.ConfigParser()
config.read('./config.ini')
datapath = os.path.join(config.get('DataPath','split_dir'),'mels_train_curated_split.pkl')
csvpath = os.path.join(config.get('DataPath','split_dir'),'train_curated_split.csv')
model_path = os.path.join(config.get('DataPath','checkpoint_dir'),config.get('SaveModel','stage0_model'))
loadModel = 'True'
save_model_filename = config.get('SaveModel','stage1_model')
os.system('CUDA_VISIBLE_DEVICES=3 python3 run_fat2019.py {} {} {} {} {}'.format(datapath,\
csvpath,\
model_path,\
loadModel,\
save_model_filename
))