-
Notifications
You must be signed in to change notification settings - Fork 0
/
recall_split_train.sh
108 lines (103 loc) · 3.96 KB
/
recall_split_train.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
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
names=("avgfp" "pab1" "gb1")
split=("first") # "second" "third")
train_sizes=(50 100 250 500 1000 2000 6000)
batch_size=32
architecture=sep_conv_mix
epochs=100
channels=7
simple=0
simple_trans_nt=0
simple_trans_t=1
aug=0
aug_trans_nt=0
aug_trans_t=0
l_rate=0.001
for p_name in "${names[@]}"; do
algn_file="datasets/alignment_files/"$p_name"_1000_experimental.clustal"
tsv="nononsense/nononsense_"$p_name".tsv"
if [ $p_name == "avgfp" ]; then
red=-rd
else
red=
fi
echo "$p_name"
echo "$tsv"
for k in "${split[@]}"; do
path="nononsense/"$k"_split_run/"$p_name"_even_splits/split_"
if [ $k == "first" ]; then
pre_weigths="result_files/saved_models/"$architecture"_pretrained_"$p_name"/"$p_name"_fr_"
elif [ $k == "second" ]; then
pre_weigths="result_files/saved_models/"$architecture"_pretrained_"$p_name"/"$p_name"_sr_"
else
pre_weigths="result_files/saved_models/"$architecture"_pretrained_"$p_name"/"$p_name"_tr_"
fi
if [ $simple == 1 ]; then
for i in "${train_sizes[@]}"; do
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" -wf -lr "$l_rate" $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
if [ $simple_trans_nt == 1 ]; then
for i in "${train_sizes[@]}"; do
weigths=$pre_weigths$i"_"*
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" --transfer_conv_weights $weigths -wf -lr "$l_rate" $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
if [ $simple_trans_t == 1 ]; then
for i in "${train_sizes[@]}"; do
weigths=$pre_weigths$i"_"*
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" --transfer_conv_weights $weigths -tl -wf -lr "$l_rate" -fc -sm $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
done
for k in "${split[@]}"; do
path="nononsense/"$k"_split_run/"$p_name"_even_splits/split_"
if [ $aug == 1 ]; then
for i in "${train_sizes[@]}"; do
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" -wf -da -lr "$l_rate" $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
if [ $aug_trans_nt == 1 ]; then
for i in "${train_sizes[@]}"; do
weigths=$pre_weigths$i"_"*
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" --transfer_conv_weights $weigths -wf -da -lr "$l_rate" $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
if [ $aug_trans_t == 1 ]; then
for i in "${train_sizes[@]}"; do
weigths=$pre_weigths$i"_"*
if [ -d "$path$i" ];
then
python3 -Wdefault ./d4_cmd_driver.py -pn "$p_name" -qn "$p_name" -af $algn_file -te $epochs -bs "$batch_size" -a "$architecture" -rs 1 --use_split_file "$path$i" --tsv_filepath "$tsv" --transfer_conv_weights $weigths -tl -wf -da -lr "$l_rate" $red
else
echo "Failed to locate folder $path$i"
fi
done
fi
done
done