-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_cifar_cnn.sh
67 lines (53 loc) · 2.55 KB
/
run_cifar_cnn.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
# experiment set
RESULT_DIR=results_cifar_cnn
DATASET=cifar_all.pkl
S=100
T=2000
K=2
B=100
device=5
SEED=5
NET=cnn
WD=0.001
PARTICIPATION=1
PATTERN=adversarial
# our proposed algorithm
ALGO=fdu
LR=0.08
S=100
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
# sgd with Importance sampling
LR=0.08
ALGO=sgd
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD --importance_sampling &
sleep 1
# sgd without importance sampling
LR = 0.08
ALGO=sgd
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
sleep 1
# fedavg(50)
LR=0.05
ALGO=fedavg
LR=0.05
S=50
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
sleep 1
# fedavg(100)
ALGO=fedavg
S=100
LR=0.06
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
sleep 1
# fedavg(25/100)
ALGO=fedavg
S=25
LR=0.06
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
sleep 1
# fedavg(10/100)
ALGO=fedavg
S=10
LR=0.05
python main.py --result_dir $RESULT_DIR --participation_level $PARTICIPATION --participation_pattern $PATTERN --gpu --dataset $DATASET --clients_per_round $S --num_round $T --local_step $K --batch_size $B --lr $LR --device $device --seed $SEED --model $NET --algo $ALGO --noprint --wd $WD &
sleep 1