-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_script_ood.sh
More file actions
80 lines (61 loc) · 3.09 KB
/
Copy pathbash_script_ood.sh
File metadata and controls
80 lines (61 loc) · 3.09 KB
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
#!/bin/bash
# Declare the arrays
unlearn=("bdist")
class_to_replace=(2)
unlearn_epochs=(5)
unlearn_lr=(0.01) #Cifar10
# unlearn_lr=(0.01 0.02 0.05) #Cifar100
#threshold=(0.01 0.05 0.1 0.5) #Cifar100
#Additional for cifar10
threshold=(0.003)
#threshold=(0.1 0.15 0.2)
#Additional for cifar100 vit_b
#unlearn_lr=(0.005 0.02 0.03)
#threshold=(0.01 0.02 0.03)
#unlearn_lr=(0.001 0.0001 0.00001)
#threshold=(0.05 0.1 0.2)
# Iterate over each combination
for ul in "${unlearn[@]}"; do
for cr in "${class_to_replace[@]}"; do
for ue in "${unlearn_epochs[@]}"; do
for lr in "${unlearn_lr[@]}"; do
for th in "${threshold[@]}"; do
# Print or execute your command here
echo "Processing: unlearn=$ul, class_to_replace=$cr, unlearn_epochs=$ue, unlearn_lr=$lr"
# python main_forget.py --batch_size 256 --weight_decay=0 --retain_percentage=1.0 --dataset cifar100 --mask_threshold $th --save_dir '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/results' --model_path '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/saved_model/vit_b_cifar100_model_SA_best.pth.tar' --unlearn $ul --class_to_replace $cr --unlearn_epochs $ue --unlearn_lr $lr --chenyaofo 0 --arch vit_b
python main_forget.py --batch_size 256 --weight_decay=0 --retain_percentage=1.0 --dataset cifar100 --mask_threshold $th --save_dir '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/results' --model_path '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/saved_model/vit_b_cifar100_model_SA_best.pth.tar' --unlearn $ul --num_indexes_to_replace 4500 --unlearn_epochs $ue --unlearn_lr $lr --chenyaofo 0 --arch vit_b
done
done
done
done
done
# Declare the arrays
# unlearn=("ood")
# class_to_replace=(0 12)
# #class_to_replace=(2)
# unlearn_epochs=(8)
# unlearn_lr=(0.00001) #Cifar10
# #unlearn_lr=(0.01 0.02 0.05) #Cifar100
# #threshold=(0.01 0.05 0.1 0.5) #Cifar100
# #Additional for cifar10
# threshold=(0.1)
# #threshold=(0.1 0.15 0.2)
# #Additional for cifar100 vit_b
# #unlearn_lr=(0.005 0.02 0.03)
# #threshold=(0.01 0.02 0.03)
# #unlearn_lr=(0.001 0.0001 0.00001)
# #threshold=(0.05 0.1 0.2)
# # Iterate over each combination
# for ul in "${unlearn[@]}"; do
# for cr in "${class_to_replace[@]}"; do
# for ue in "${unlearn_epochs[@]}"; do
# for lr in "${unlearn_lr[@]}"; do
# for th in "${threshold[@]}"; do
# # Print or execute your command here
# echo "Processing: unlearn=$ul, class_to_replace=$cr, unlearn_epochs=$ue, unlearn_lr=$lr"
# python main_forget.py --batch_size 256 --weight_decay=0 --retain_percentage=1.0 --dataset cifar100 --mask_threshold $th --save_dir '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/results' --model_path '/home/sazzad/Machine Unlearning/Unlearn-Saliency-master/Classification/saved_model/Resnet20s_cifar100_model_SA_best.pth.tar' --unlearn $ul --class_to_replace $cr --unlearn_epochs $ue --unlearn_lr $lr --chenyaofo 0 --arch resnet20s
# done
# done
# done
# done
# done