final curiousity experiments
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user