-
-
Notifications
You must be signed in to change notification settings - Fork 435
Open
Description
I would like to use the foolbox my own dataset (say imagenet1k), here i wanted to know how could I find the robust accuracy after the attack as i am going to load the images in batch.
For example -
for _, (clean_x_test, clean_y_test) in enumerate(val_loader):
clean_x_test = clean_x_test.to(device)
clean_y_test = clean_y_test.to(device)
_, advs, success = fb.attacks.LinfPGD(rel_stepsize=0.01, steps=attack_iterations)(fmodel, clean_x_test.to('cuda:0'), clean_y_test.to('cuda:0'), epsilons=eps)
adv_accuracy = 1 - success.float().mean().item()`Metadata
Metadata
Assignees
Labels
No labels