-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_script_unsir.sh
More file actions
50 lines (42 loc) · 2 KB
/
bash_script_unsir.sh
File metadata and controls
50 lines (42 loc) · 2 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
#!/bin/bash
# Declare the arrays
unlearn=("unsir")
class_to_replace=(0 4 6 8)
#class_to_replace=(2)
unlearn_epochs=(1)
unlearn_lr=(0.001)
threshold=(0.02)
# 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 cifar10 --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_cifar10_model_SA_best.pth.tar' --unlearn $ul --class_to_replace $cr --unlearn_epochs $ue --unlearn_lr $lr --chenyaofo 0 --arch vit_b
done
done
done
done
done
unlearn=("unsir")
class_to_replace=(0 4 6 8)
#class_to_replace=(2)
unlearn_epochs=(1)
unlearn_lr=(0.01)
threshold=(0.02)
# 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
done
done
done
done
done