File tree 4 files changed +15
-16
lines changed
4 files changed +15
-16
lines changed Original file line number Diff line number Diff line change 3
3
gpu_id=0
4
4
nb_worker=24
5
5
6
- exp_name=" decode_ASC "
7
- CUDA_VISIBLE_DEVICES=${gpu_id} python evaluate .py -verbose 0 \
6
+ exp_name=" EvalASC "
7
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
8
8
-task ASC \
9
9
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
10
10
-nb_worker ${nb_worker} \
11
11
-bs_ASC 32 -bs_SED 24 -bs_TAG 32 \
12
12
-dir_model_weight ./weights/DcaseNet_v3_finetune_best_ASC.pt
13
13
14
- exp_name=" decode_TAG "
15
- CUDA_VISIBLE_DEVICES=${gpu_id} python evaluate .py -verbose 0 \
14
+ exp_name=" EvalTAG "
15
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
16
16
-task TAG \
17
17
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
18
18
-nb_worker ${nb_worker} \
19
19
-bs_ASC 32 -bs_SED 24 -bs_TAG 32 \
20
20
-dir_model_weight ./weights/DcaseNet_v3_finetune_best_TAG.pt
21
21
22
- exp_name=" decode_SED "
23
- CUDA_VISIBLE_DEVICES=${gpu_id} python evaluate .py -verbose 0 \
22
+ exp_name=" EvalSED "
23
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
24
24
-task SED \
25
25
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
26
26
-nb_worker ${nb_worker} \
Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ def main():
164
164
with open (save_dir + 'modelsumm.txt' , 'w' ) as f : f .write (str (model_summ ))
165
165
166
166
#load weights
167
- if args . phase == 'fine_tune' or args .phase == 'eval' :
167
+ if 'fine-tune' in args .name or 'Eval' in args . name :
168
168
model .load_state_dict (torch .load (args .dir_model_weight ))
169
169
model = model .to (device )
170
170
171
- if args . phase == 'eval' :
171
+ if 'Eval' in args . name :
172
172
if 'ASC' in args .task :
173
173
acc , conf_mat = evaluate_ASC (model = model ,
174
174
evlset_gen = evlset_gen_ASC ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ def get_args():
9
9
##########
10
10
## PATH ##
11
11
##########
12
- parser .add_argument ('-phase' , type = str , required = True )
13
12
parser .add_argument ('-name' , type = str , required = True )
14
13
parser .add_argument ('-save_dir' , type = str , required = True )
15
14
parser .add_argument ('-dir_model_weight' , type = str , default = '' )
Original file line number Diff line number Diff line change 12
12
if [ ${phase} -le 0 ]; then
13
13
# #####
14
14
# Joint train ASC, TAG, and SED tasks using DcaseNet-v3 architecture
15
- CUDA_VISIBLE_DEVICES=${gpu_id} python joint_train_DcaseNet .py -verbose 0 \
15
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
16
16
-nb_iter_per_epoch 500 \
17
17
-task ASC SED TAG \
18
18
-name ${joint_model_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
28
28
if [ ${phase} -le 1 ]; then
29
29
# ####
30
30
# fine-tune for ASC
31
- exp_name=" finetune_ASC "
32
- CUDA_VISIBLE_DEVICES=${gpu_id} python fine_tune_single_task .py -verbose 0 \
31
+ exp_name=" fine-tune_ASC "
32
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
33
33
-nb_iter_per_epoch 500 \
34
34
-task ASC \
35
35
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
46
46
if [ ${phase} -le 1 ]; then
47
47
# ####
48
48
# fine-tune for TAG
49
- exp_name=" finetune_TAG "
50
- CUDA_VISIBLE_DEVICES=${gpu_id} python fine_tune_single_task .py -verbose 0 \
49
+ exp_name=" fine-tune_TAG "
50
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
51
51
-nb_iter_per_epoch 500 \
52
52
-task TAG \
53
53
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
64
64
if [ ${phase} -le 1 ]; then
65
65
# ####
66
66
# fine-tune for SED
67
- exp_name=" finetune_SED "
68
- CUDA_VISIBLE_DEVICES=${gpu_id} python fine_tune_single_task .py -verbose 0 \
67
+ exp_name=" fine-tune_SED "
68
+ CUDA_VISIBLE_DEVICES=${gpu_id} python main .py -verbose 0 \
69
69
-nb_iter_per_epoch 500 \
70
70
-task TAG \
71
71
-name ${exp_name} -model_scp DcaseNet -model_name get_DcaseNet_v3 \
You can’t perform that action at this time.
0 commit comments