From a4ce50323815d299b4ff9f1ccb3c48183c76ce92 Mon Sep 17 00:00:00 2001 From: Nataniel Ruiz Date: Thu, 9 Jan 2020 12:27:28 -0400 Subject: [PATCH] GANimation conditional attacks --- ganimation/attacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ganimation/attacks.py b/ganimation/attacks.py index e43bba0..7996b37 100644 --- a/ganimation/attacks.py +++ b/ganimation/attacks.py @@ -119,9 +119,9 @@ class LinfPGDAttack(object): X = X_nat.clone().detach_() J = c_trg.size(0) - full_loss = 0.0 - + for i in range(self.k): + full_loss = 0.0 X.requires_grad = True self.model.zero_grad()