Skip to content

Commit

Permalink
Update Universal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YaxinLi0-0 authored Apr 4, 2024
1 parent 60bc64f commit 3155d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deeprobust/image/attack/Universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def universal_adversarial_perturbation(dataloader, model, device, xi=10, delta=0
v.requires_grad_()

fooling_rate = 0.0
num_images = num_classes
num_images = len(dataloader)
itr = 0

while fooling_rate < 1-delta and itr < max_iter_uni:
Expand Down

0 comments on commit 3155d9b

Please sign in to comment.