-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.sh
executable file
·43 lines (37 loc) · 1.33 KB
/
main.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
#!/bin/bash
if [ $1 = 'plain' ] || [ $1 = 'all' ]; then
echo -e "\nTraining model without noise or NoPeek\n"
python train/train_model.py --noise_scale 0.0 --nopeek_weight 0.0
fi
if [ $1 = 'noise' ] || [ $1 = 'all' ]; then
for noise in 0.1 0.2 0.5 1.0 2.0 5.0
do
echo -e "\nTraining model with noise $noise\n"
python scripts/train_model.py --noise_scale $noise --nopeek_weight 0.0
done
fi
# NoPeek is very computationally expensive!
if [ $1 = 'nopeek' ] || [ $1 = 'all' ]; then
for nopeek in 0.05 0.1 0.25 0.5 1.0
do
echo -e "\nTraining model with nopeek weight $nopeek\n"
python scripts/train_model.py --noise_scale 0.0 --nopeek_weight $nopeek --batch_size 32
done
fi
# NoPeek is very computationally expensive!
if [ $1 = 'combo' ] || [ $1 = 'all' ]; then
for noise in 0.1 0.2 0.5 1.0
do
for nopeek in 0.1 0.25 0.5
do
echo -e "\nTraining model with noise $noise and nopeek weight $nopeek\n"
python scripts/train_model.py --noise_scale $noise --nopeek_weight $nopeek --batch_size 32
done
done
fi
if [ $1 = 'performance' ] || [ $1 = 'all' ]; then
echo -e "\nEvaluating classifier performances\n"
python scripts/evaluate_models.py
echo -e "\nEvaluating attack performances\n"
python scripts/evaluate_attackers.py
fi