-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathquick_eval.sh
executable file
·32 lines (27 loc) · 1.4 KB
/
quick_eval.sh
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
cd evar
GPU=0
if [[ "$1" == *'p32k-'* ]]; then
cfg='config/m2d_32k.yaml'
cfg_clap='config/m2d_clap_32k.yaml'
else
cfg='config/m2d.yaml'
cfg_clap='config/m2d_clap.yaml'
fi
if [[ "$1" == *'_clap'* ]]; then
zs_opt=',flat_features=True'
fi
CUDA_VISIBLE_DEVICES=$GPU python lineareval.py $cfg cremad batch_size=16,weight_file=$1
CUDA_VISIBLE_DEVICES=$GPU python lineareval.py $cfg gtzan batch_size=16,weight_file=$1
CUDA_VISIBLE_DEVICES=$GPU python lineareval.py $cfg spcv2 batch_size=64,weight_file=$1
CUDA_VISIBLE_DEVICES=$GPU python lineareval.py $cfg esc50 batch_size=64,weight_file=$1
if [[ "$1" == *'_clap'* ]] || [[ "$1" == *'_capgte'* ]]; then
echo 'Zero-shot evaluation'
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap cremad batch_size=16,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap gtzan batch_size=16,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap nsynth batch_size=64,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap esc50 batch_size=64,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap us8k batch_size=64,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap fsd50k batch_size=64,weight_file=$1$zs_opt
CUDA_VISIBLE_DEVICES=$GPU python zeroshot.py $cfg_clap as batch_size=64,weight_file=$1$zs_opt
fi
python summarize.py $1