Skip to content

Commit

Permalink
all taacks expet p attack
Browse files Browse the repository at this point in the history
  • Loading branch information
fazelehh committed Oct 16, 2024
1 parent 28bfc48 commit aa34e10
Show file tree
Hide file tree
Showing 6 changed files with 683 additions and 317 deletions.
44 changes: 0 additions & 44 deletions examples/mia/cifar/audit.yml

This file was deleted.

7 changes: 2 additions & 5 deletions examples/mia/cifar/cifar_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

from leakpro import AbstractInputHandler

class Cifar100InputHandler(AbstractInputHandler):
class CifarInputHandler(AbstractInputHandler):
"""Class to handle the user input for the CIFAR100 dataset."""

def __init__(self, configs: dict) -> None:
super().__init__(configs = configs)
print(configs)


def get_criterion(self)->None:
Expand Down Expand Up @@ -61,10 +62,6 @@ def train(
train_acc += pred.eq(labels.data.view_as(pred)).sum()
train_loss += loss.item()

log_train_str = (
f"Epoch: {epoch+1}/{epochs} | Train Loss: {train_loss/len(dataloader):.8f} | "
f"Train Acc: {float(train_acc)/len(dataloader.dataset):.8f}")
self.logger.info(log_train_str)
model.to("cpu")

return {"model": model, "metrics": {"accuracy": train_acc, "loss": train_loss}}
304 changes: 304 additions & 0 deletions examples/mia/cifar/cifar_main.ipynb

Large diffs are not rendered by default.

142 changes: 0 additions & 142 deletions examples/mia/cifar/utils/cifar_data_prepration.py

This file was deleted.

108 changes: 0 additions & 108 deletions examples/mia/cifar/utils/cifar_model_prepration.py

This file was deleted.

395 changes: 377 additions & 18 deletions examples/mia/tabular_mia/main.ipynb

Large diffs are not rendered by default.

0 comments on commit aa34e10

Please sign in to comment.