attck metrics
This commit is contained in:
@@ -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"):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user