Skip to content

Commit d9fa474

Browse files
Irina NicolaeIrina Nicolae
authored andcommitted
Correct update in universal perturbation attack
(cherry picked from commit f8d50a6)
1 parent 0f7f0a2 commit d9fa474

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

art/attacks/newtonfool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import absolute_import, division, print_function
1+
from __future__ import absolute_import, division, print_function, unicode_literals
22

33
import numpy as np
44

art/attacks/universal_perturbation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def generate(self, x, **kwargs):
104104

105105
# If the class has changed, update v
106106
if fk_i_hat != adv_fk_i_hat:
107-
v += adv_xi - xi - v
107+
v += adv_xi - xi
108108

109109
# Project on L_p ball
110110
v = self._clip_perturbation(v, self.eps, self.p)

0 commit comments

Comments
 (0)