-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_script_be.sh
More file actions
68 lines (56 loc) · 2.91 KB
/
bash_script_be.sh
File metadata and controls
68 lines (56 loc) · 2.91 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
#!/bin/bash
# Declare the arrays
unlearn=("boundary_shrink")
class_to_replace=(2)
#class_to_replace=(2)
unlearn_epochs=(10)
unlearn_lr=(0.00001)
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 128 --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
# Iterate over each combination
for ul in "${unlearn[@]}"; 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 32 --retain_percentage=1.0 --weight_decay=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 2 --unlearn_epochs $ue --unlearn_lr $lr --chenyaofo 0 --arch vit_b
done
done
done
done
#Cifar100
# Declare the arrays
# unlearn=("boundary_expanding")
# class_to_replace=(0 4 6 8)
# #class_to_replace=(2)
# unlearn_epochs=(10)
# unlearn_lr=(0.0001)
# 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 128 --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