From 77f174fc9b1941202c14492802433a98b4b6b466 Mon Sep 17 00:00:00 2001 From: Nataniel Ruiz Date: Thu, 9 Jan 2020 12:22:22 -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 c879e6a..d6918f4 100644 --- a/ganimation/attacks.py +++ b/ganimation/attacks.py @@ -122,9 +122,9 @@ class LinfPGDAttack(object): full_loss = 0.0 for i in range(self.k): + X.requires_grad = True for j in range(J): - # print(i) - X.requires_grad = True + print(i, j) output_att, output_img = self.model(X, c_trg[j,:].unsqueeze(0)) out = imFromAttReg(output_att, output_img, X)