-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_neurallog.sh
45 lines (44 loc) · 2.44 KB
/
run_neurallog.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
#!/bin/bash
datasets=( filtered unfiltered )
word_embeds=( bert )
encoders=( transformer )
weight_class=( uniform balanced inverse )
losses=( cross_entropy focal )
poolings=( cls max avg )
bidirectionals=( true false )
n_layers=( 1 )
n_heads=( 12 )
for dataset in "${datasets[@]}"; do
echo "dataset: "$dataset""
for word_embed in "${word_embeds[@]}"; do
for encoder in "${encoders[@]}"; do
for weight in "${weight_class[@]}"; do
for loss in "${losses[@]}"; do
if [ "$encoder" = "none" ]; then
for pooling in "${poolings[@]}"; do
python baseline.py --dataset "$dataset" --word_embed "$word_embed" --encoder "$encoder" --pooling "$pooling" --class_weight "$weight" --loss "$loss" --save_best_model --viz_projection --output_dir neurallog
done
else
for n_layer in "${n_layers[@]}"; do
if [ "$encoder" = "transformer" ]; then
for n_head in "${n_heads[@]}"; do
for pooling in "${poolings[@]}"; do
python baseline.py --dataset "$dataset" --word_embed "$word_embed" --encoder "$encoder" --n_layers "$n_layer" --n_heads "$n_head" --pooling "$pooling" --class_weight "$weight" --loss "$loss" --save_best_model --viz_projection --output_dir neurallog
done
done
else
for bidirectional in "${bidirectionals[@]}"; do
if [ "$bidirectional" = true ]; then
python baseline.py --dataset "$dataset" --word_embed "$word_embed" --encoder "$encoder" --n_layers "$n_layer" --bidirectional --class_weight "$weight" --loss "$loss" --save_best_model --viz_projection --output_dir neurallog
else
python baseline.py --dataset "$dataset" --word_embed "$word_embed" --encoder "$encoder" --n_layers "$n_layer" --class_weight "$weight" --loss "$loss" --save_best_model --viz_projection --output_dir neurallog
fi
done
fi
done
fi
done
done
done
done
done