-
Notifications
You must be signed in to change notification settings - Fork 0
/
B3D_experiment_launcher.sh
executable file
·128 lines (107 loc) · 7.17 KB
/
B3D_experiment_launcher.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# test
CUDA_VISIBLE_DEVICES=0 python B3D_experiment_launcher.py \
--model_type core --model_name ResNet-18 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-18_CIFAR-10_BadNets_2022-11-05_16:13:21/ckpt_epoch_200.pth \
--dataset_name CIFAR-10 --batch_size 128 --num_workers 4 \
--y_target 1 --trigger_size 3 --init_cost_rate 1.0 \
--B3D_epochs 1 --B3D_lr 0.05 \
2>&1 | tee 0.log
# test samples_per_draw
CUDA_VISIBLE_DEVICES=0 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.96 --samples_per_draw 800 \
2>&1 | tee 0.log
CUDA_VISIBLE_DEVICES=1 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.96 --samples_per_draw 1600 \
2>&1 | tee 1.log
CUDA_VISIBLE_DEVICES=2 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.96 --samples_per_draw 3200 \
2>&1 | tee 2.log
CUDA_VISIBLE_DEVICES=3 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.96 --samples_per_draw 6400 \
2>&1 | tee 3.log
# test attack_succ_threshold
CUDA_VISIBLE_DEVICES=0 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.95 \
2>&1 | tee 0.log
CUDA_VISIBLE_DEVICES=1 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.96 \
2>&1 | tee 1.log
CUDA_VISIBLE_DEVICES=2 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.97 \
2>&1 | tee 2.log
CUDA_VISIBLE_DEVICES=3 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 200 --B3D_lr 0.1 --attack_succ_threshold 0.98 \
2>&1 | tee 3.log
# bad learning rate
CUDA_VISIBLE_DEVICES=1 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.01 \
2>&1 | tee 1.log
CUDA_VISIBLE_DEVICES=2 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.005 \
2>&1 | tee 2.log
CUDA_VISIBLE_DEVICES=3 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.001 \
2>&1 | tee 3.log
CUDA_VISIBLE_DEVICES=0 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.1 \
2>&1 | tee 0.log
CUDA_VISIBLE_DEVICES=1 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.2 \
2>&1 | tee 1.log
CUDA_VISIBLE_DEVICES=2 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.4 \
2>&1 | tee 2.log
CUDA_VISIBLE_DEVICES=3 python B3D_experiment_launcher.py \
--model_type torchvision --model_name ResNet-50 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-50_ImageNet100_40x40_2022-11-08_20:10:14/ckpt_epoch_90.pth \
--dataset_name ImageNet100 --batch_size 128 --num_workers 4 \
--y_target 0 --trigger_size 40 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.8 \
2>&1 | tee 3.log
# benchmark core ResNet-18 CIFAR-10
CUDA_VISIBLE_DEVICES=0 python B3D_experiment_launcher.py \
--model_type core --model_name ResNet-18 --model_path /mnt/ceph_mengxiya/Backdoor/Backdoor_XAI/experiments/ResNet-18_CIFAR-10_BadNets_2022-11-05_16:13:21/ckpt_epoch_200.pth \
--dataset_name CIFAR-10 --batch_size 128 --num_workers 4 \
--y_target 1 --trigger_size 3 --init_cost_rate 1.0 \
--B3D_epochs 20 --B3D_lr 0.05 \
2>&1 | tee 0.log