This commit is contained in:
Nataniel Ruiz committed 2019-12-24 14:07:25 -04:00
1 parent f352bfd25d
commit 9c2cb063be
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ class LinfPGDAttack(object):
y = torch.FloatTensor(y).to(self.device)
self.model.zero_grad()
loss = self.loss_fn(output, y)
loss = -self.loss_fn(output, y)
loss.backward()
grad = X.grad