Skip to content

Commit b817b9c

Browse files
committed
mypy fixes
Signed-off-by: GiulioZizzo <[email protected]>
1 parent 63916b2 commit b817b9c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

art/estimators/certification/randomized_smoothing/pytorch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ def fit( # pylint: disable=W0221
222222
if scheduler is not None:
223223
scheduler.step()
224224

225-
def predict(self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs) -> np.ndarray: # type: ignore
225+
def predict( # type: ignore
226+
self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs
227+
) -> np.ndarray:
226228
"""
227229
Perform prediction of the given classifier for a batch of inputs, taking an expectation over transformations.
228230

art/estimators/certification/randomized_smoothing/tensorflow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ def train_step(model, images, labels):
191191
if scheduler is not None:
192192
scheduler(epoch)
193193

194-
def predict(self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs) -> np.ndarray: # type: ignore
194+
def predict( # type: ignore
195+
self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs
196+
) -> np.ndarray:
195197
"""
196198
Perform prediction of the given classifier for a batch of inputs, taking an expectation over transformations.
197199

0 commit comments

Comments
 (0)