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

View File

@@ -195,6 +195,13 @@ class UnlearningAttack:
# out
out_filtered = out_filtered[:,mask]
out_naive = out_naive[:, mask]
# testin masked
mask = torch.ones(out_filtered.shape[1], dtype = torch.bool, device = device)
mask[target_class] = False
# out
out_filtered = out_filtered[:,mask]
out_naive = out_naive[:, mask]
filtered_logits.append(out_filtered)
naive_logits.append(out_naive)
@@ -225,7 +232,7 @@ class UnlearningAttack:
# load from disk if saved model available
target_dir = os.path.join("reports", framework_name)
os.makedirs(target_dir, exist_ok=True)
current_log_file = os.path.join(target_dir, "attack_values.csv")
current_log_file = os.path.join(target_dir, "values.csv")
if not os.path.exists(current_log_file):
with open(current_log_file, "w") as f: