Skip to content

Commit f1cb37d

Browse files
author
Beat Buesser
committed
Fix LGTM alert
Signed-off-by: Beat Buesser <[email protected]>
1 parent fdc4532 commit f1cb37d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

art/estimators/estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def __init__(
8181
self.preprocessing_defences = self._set_preprocessing_defences(preprocessing_defences)
8282
self.postprocessing_defences = self._set_postprocessing_defences(postprocessing_defences)
8383
self.preprocessing_operations: List["Preprocessor"] = []
84-
self._update_preprocessing_operations()
85-
self._check_params()
84+
BaseEstimator._update_preprocessing_operations(self)
85+
BaseEstimator._check_params(self)
8686

8787
def _update_preprocessing_operations(self):
8888
from art.defences.preprocessor.preprocessor import Preprocessor

art/estimators/pytorch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def __init__(self, device_type: str = "gpu", **kwargs) -> None:
7272
cuda_idx = torch.cuda.current_device()
7373
self._device = torch.device("cuda:{}".format(cuda_idx))
7474

75+
PyTorchEstimator._check_params(self)
76+
7577
def predict(self, x: np.ndarray, batch_size: int = 128, **kwargs):
7678
"""
7779
Perform prediction of the neural network for samples `x`.

art/estimators/tensorflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def __init__(self, **kwargs):
117117
kwargs["preprocessing"] = StandardisationMeanStdTensorFlowV2(mean=preprocessing[0], std=preprocessing[1])
118118

119119
super().__init__(**kwargs)
120+
TensorFlowV2Estimator._check_params(self)
121+
120122

121123
def predict(self, x: np.ndarray, batch_size: int = 128, **kwargs):
122124
"""

0 commit comments

Comments
 (0)