attck metrics

This commit is contained in:
2026-07-08 00:25:07 +02:00
parent 026ca47800
commit eb8060fc05
37 changed files with 1649 additions and 66 deletions

View File

@@ -108,21 +108,7 @@ class Model(ABC):
self.model.to(self.device)
print(f'Model loaded from {file_path}')
'''
def unlearn(self, strategy: 'Strategy', forget_loader, retain_loader):
""" Executes a targeted unlearning strategy and profiles efficiency """
print(f"Executing: {strategy.__class__.__name__}...")
start_time = time.time()
# Delegate the actual algorithmic weight/logit manipulation to the strategy
strategy.apply(self.model, forget_loader, retain_loader)
elapsed_time = time.time() - start_time
print(f"{strategy.__class__.__name__} completed in {elapsed_time:.4f} seconds.")
return elapsed_time
'''
def evaluate(self, loader, mode="eval"):
"""