-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_script_ood_thresh.sh
More file actions
40 lines (31 loc) · 1.32 KB
/
bash_script_ood_thresh.sh
File metadata and controls
40 lines (31 loc) · 1.32 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
#!/bin/bash
# Declare the arrays
unlearn=("ood")
class_to_replace=(2)
#class_to_replace=(2)
unlearn_epochs=(8 10)
unlearn_lr=(0.01 0.001 0.0001) #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.01 0.001 0.001)
#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
done
done
done
done
done