Skip to content

Commit 2d869db

Browse files
author
Beat Buesser
committed
Update typing
Signed-off-by: Beat Buesser <[email protected]>
1 parent b368f4b commit 2d869db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

art/defences/preprocessor/pixel_defend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535

3636
from art.config import ART_NUMPY_DTYPE
3737
from art.defences.preprocessor.preprocessor import Preprocessor
38-
from art.estimators.estimator import NeuralNetworkMixin
39-
from art.estimators.classification.classifier import ClassifierMixin
4038

4139
if TYPE_CHECKING:
4240
from art.utils import CLIP_VALUES_TYPE, CLASSIFIER_NEURALNETWORK_TYPE
@@ -159,6 +157,8 @@ def _check_params(self) -> None:
159157
if not isinstance(self.eps, (int, np.int)) or self.eps < 0 or self.eps > 255:
160158
raise ValueError("The defense parameter must be between 0 and 255.")
161159

160+
from art.estimators.classification.classifier import ClassifierMixin
161+
from art.estimators.estimator import NeuralNetworkMixin
162162
if hasattr(self, "pixel_cnn") and not (
163163
isinstance(self.pixel_cnn, ClassifierMixin) and isinstance(self.pixel_cnn, NeuralNetworkMixin)
164164
):

0 commit comments

Comments
 (0)