Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry24k committed Mar 16, 2020
1 parent 0d212b8 commit b0510b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ demos/data/cifar*
MENIFEST.in
setup.cfg
setup.py
data/
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,8 @@ This demo shows how to do adversarial training with this repository. The MNIST d
### Version 1.0
* **attack.py** :
* **load** : Load is depreciated. Instead, use TensorDataset and DataLoader.
* **save** : The problem of calculating invalid accuracy when the mode of the attack set to 'int' is solved.
* **save** : The problem of calculating invalid accuracy when the mode of the attack set to 'int' is solved.

### Version 1.1
* **DeepFool** :
* [**Error solved**](https://github.com/Harry24k/adversairal-attacks-pytorch/issues/2).
3 changes: 2 additions & 1 deletion torchattacks/attacks/deepfool.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def forward(self, images, labels):
image.requires_grad = True
output = self.model(image)[0]
_, pre = torch.max(output, 0)

if pre != pre_0 :
image = torch.clamp(image, min=0, max=1).detach()
break

r = None
Expand Down

0 comments on commit b0510b5

Please sign in to comment.