Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
  • Loading branch information
GiulioZizzo committed Dec 20, 2023
1 parent 63916b2 commit b817b9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion art/estimators/certification/randomized_smoothing/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def fit( # pylint: disable=W0221
if scheduler is not None:
scheduler.step()

def predict(self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs) -> np.ndarray: # type: ignore
def predict( # type: ignore
self, x: np.ndarray, batch_size: int = 128, verbose: bool = False, **kwargs
) -> np.ndarray:
"""
Perform prediction of the given classifier for a batch of inputs, taking an expectation over transformations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ def train_step(model, images, labels):
if scheduler is not None:
scheduler(epoch)

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

0 comments on commit b817b9c

Please sign in to comment.