Skip to content

Commit

Permalink
Fix unused variable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Nov 21, 2024
1 parent 52701fa commit 7365886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchattack/eval/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run_attack(
victim_frms = [FoolingRateMetric() for _ in victim_model_names]

# Run attack over the dataset (100 images by default)
for i, (x, y, _) in enumerate(dataloader):
for _i, (x, y, _) in enumerate(dataloader):
x, y = x.to(device), y.to(device)

# Adversarial images are created here
Expand All @@ -82,7 +82,7 @@ def run_attack(
frm.update(y, cln_outs, adv_outs)

# *Save first batch of adversarial examples
# if i == 0:
# if _i == 0:
# import torchvision as tv

# saved_imgs = advs.detach().cpu().mul(255).to(torch.uint8)
Expand Down

0 comments on commit 7365886

Please sign in to comment.