Skip to content

Commit 2684fa7

Browse files
committed
typing
Signed-off-by: Taesung Lee <[email protected]>
1 parent 4d5583a commit 2684fa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

art/attacks/poisoning/gradient_matching_attack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def poison(
440440
x_train[best_indices_poison] = best_x_poisoned
441441
return x_train, y_train # y_train has not been modified.
442442

443-
def __poison__pytorch(self, x_poison: np.ndarray, y_poison: np.ndarray) -> Tuple[Any, float]:
443+
def __poison__pytorch(self, x_poison: np.ndarray, y_poison: np.ndarray) -> Tuple[Any, Any]:
444444
"""
445445
Optimize the poison by matching the gradient within the perturbation budget.
446446
@@ -510,7 +510,7 @@ def __len__(self):
510510
count += 1
511511
return np.concatenate(all_poisoned_samples, axis=0), B_sum / count
512512

513-
def __poison__tensorflow(self, x_poison: np.ndarray, y_poison: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
513+
def __poison__tensorflow(self, x_poison: np.ndarray, y_poison: np.ndarray) -> Tuple[Any, Any]:
514514
"""
515515
Optimize the poison by matching the gradient within the perturbation budget.
516516

0 commit comments

Comments
 (0)