next
This commit is contained in:
1 parent
cb4eb8c8fc
commit
d63731fb64
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user