Skip to content

Commit 4d5583a

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

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
@@ -22,7 +22,7 @@
2222
from __future__ import absolute_import, division, print_function, unicode_literals
2323

2424
import logging
25-
from typing import Dict, Tuple, TYPE_CHECKING, List
25+
from typing import Any, Dict, Tuple, TYPE_CHECKING, List
2626

2727
import numpy as np
2828
from tqdm.auto import trange, tqdm
@@ -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[np.ndarray, np.ndarray]:
443+
def __poison__pytorch(self, x_poison: np.ndarray, y_poison: np.ndarray) -> Tuple[Any, float]:
444444
"""
445445
Optimize the poison by matching the gradient within the perturbation budget.
446446

0 commit comments

Comments
 (0)