final curiousity experiments

This commit is contained in:
2026-07-12 12:47:44 +02:00
parent 946de49b3e
commit ac493698e9
13 changed files with 602 additions and 6 deletions

11
Tune.py
View File

@@ -62,6 +62,7 @@ def prepare_data_and_model_environment():
# get Cuda or CPU.
device = get_device()
dataset_name = Set_Name.CASIAFACES
# we are changing this sample size if we use CASIA Set
if dataset_name == Set_Name.CASIAFACES:
SAMPLE_SIZE = 400
TRAINING_SAMPLE = 320
@@ -259,7 +260,7 @@ def run_unlearning_and_strategy_eval(env_dict, forget_class_idx, strategy, evalu
# entry
if __name__ == "__main__":
outer_loop = 20
outer_loop = 2
inner_loop = CLASS_SIZE
@@ -301,7 +302,7 @@ if __name__ == "__main__":
# WF-Net
weight_filtration = WeightFiltration(
target_class_index=0, #arch ResNet18 GoogLeNet/Inception
epochs=6, #
epochs=8, #
lr=250.0, # ResNet18 = 150 # 150 100
gamma=0.001, # 0.001
lambda_1=30, # 25 100
@@ -319,8 +320,8 @@ if __name__ == "__main__":
strategies = [
#retrain,
linear_filtration,
#weight_filtration,
#linear_filtration,
weight_filtration,
#certified_unlearning,
]
suite_runner = UnlearningAttack(arch=ARCH, class_size=CLASS_SIZE)
@@ -341,7 +342,7 @@ if __name__ == "__main__":
# if we are finetuning, no need to evaluate base model.
# or may be never when not either!
evaluate = not finetuning,
suite_runner=suite_runner
#suite_runner=suite_runner
)