Skip to content

Commit 811a7ff

Browse files
author
Beat Buesser
committed
Update format
Signed-off-by: Beat Buesser <[email protected]>
1 parent 61dbf25 commit 811a7ff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

art/attacks/evasion/adversarial_patch/adversarial_patch_numpy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def __init__(
144144
self.patch_shape = self.image_shape
145145

146146
self.patch = None
147-
self.mean_value = (self.estimator.clip_values[1] - self.estimator.clip_values[0]) / 2.0 + self.estimator.clip_values[
148-
0
149-
]
147+
self.mean_value = (
148+
self.estimator.clip_values[1] - self.estimator.clip_values[0]
149+
) / 2.0 + self.estimator.clip_values[0]
150150
self.reset_patch(self.mean_value)
151151

152152
def generate(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> Tuple[np.ndarray, np.ndarray]:

art/attacks/evasion/adversarial_patch/adversarial_patch_tensorflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,4 +481,4 @@ def reset_patch(self, initial_patch_value: Optional[Union[float, np.ndarray]]) -
481481
elif self.patch.shape == initial_patch_value.shape:
482482
self._patch.assign(initial_patch_value)
483483
else:
484-
raise ValueError("Unexpected value for initial_patch_value.")
484+
raise ValueError("Unexpected value for initial_patch_value.")

0 commit comments

Comments
 (0)